Results 1 to 4 of 4
hi everyone i would like to do the following task with top
one run in batch mode showing the memory stats (VIRT RES SHR S %MEM CODE DATA) in Kb.
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-01-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 6
TOP in batch mode showing mem stats in Kb
hi everyone i would like to do the following task with top
one run in batch mode showing the memory stats (VIRT RES SHR S %MEM CODE DATA) in Kb.
Is it possible ?
Thanks a lot
- 11-01-2011 #2
by default. it shows all those values in kb. as far as running once:
Code:top -b -n 1
linux user # 503963
- 11-01-2011 #3Just Joined!
- Join Date
- Feb 2011
- Posts
- 6
NO. IT DOES NOT.
here are the first 3 lines
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3058 oracle 20 0 2982m 451m 211m R 100 0.7 15972:48 oracle
8203 oracle 20 0 1756m 637m 628m R 100 1.0 99:36.71 oracle
30109 oracle 20 0 1751m 112m 109m R 100 0.2 15:28.32 oracle
It is not showing DATA & CODE and the sizes are in Human Readable format
- 11-01-2011 #4
You can control top with a toprc file. Can be a userfile or stuck in /etc/toprc.
If it doesn't exist, run top interactively. Hit 'f', to add/subtract whatever fields you desire. (In your case its probably 'r' and 's'). Hit enter to exit the field selection. Hit 'W' to write a user toprc file. Then 'q' to exit.
When you run top, it will show Data and Code now.Last edited by scathefire; 11-01-2011 at 10:51 PM.
linux user # 503963


Reply With Quote

