09-21-2001
Interpretting the result of TOP command
I want to find out how much memory is used by one unix process. I guess I can use unix top command. I have seen the SIZE and RES column in the TOP command. For Oracle client connections these values are too high about 700M , My system does not have that much pysical memory. Here is few Oracle processes listing. I don't believe that Oracle will use about 650M for a client connection. Can anybody help me understanding it.
Thanks for you help.
Sanjay
PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
21156 sanjay 1 10 0 2264K 1824K cpu0 0:02 4.71% top
18843 oracle 1 30 0 653M 619M sleep 0:14 1.18% oracle
20470 oracle 11 30 0 655M 623M sleep 34:40 0.30% oracle
18709 oracle 1 30 0 653M 619M sleep 2:56 0.08% oracle
11889 oracle 11 53 0 657M 622M sleep 25:35 0.05% oracle
11903 oracle 11 58 0 655M 622M sleep 0:19 0.04% oracle
11909 oracle 13 50 0 655M 622M sleep 3:55 0.03% oracle
11879 oracle 12 59 0 655M 621M sleep 16:15 0.02% oracle
3678 oracle 1 58 0 654M 621M sleep 2:09 0.02% oracle
18711 oracle 1 59 0 652M 618M sleep 0:16 0.02% oracle
11883 oracle 11 50 0 657M 623M sleep 18:40 0.01% oracle
597 root 7 59 -16 3576K 2208K sleep 5:27 0.01% VolumeAgent
20522 sanjay 1 48 0 2056K 1616K sleep 0:00 0.01% bash
11873 oracle 11 55 0 655M 625M sleep 14:20 0.00% oracle
11 root 4 58 0 2960K 1072K sleep 12:57 0.00% vxconfigd
19619 oracle 1 58 0 653M 620M sleep 8:18 0.00% oracle
3555 root 1 51 0 86M 2872K sleep 61:07 0.00% snmpd
1666 oracle 11 58 0 654M 609M sleep 43:50 0.00% oracle
11897 oracle 11 58 0 658M 623M sleep 34:20 0.00% oracle
14793 oracle 11 59 0 657M 622M sleep 30:41 0.00% oracle
11899 oracle 11 58 0 656M 622M sleep 24:13 0.00% oracle
10517 oracle 11 28 0 656M 623M sleep 22:22 0.00% oracle
10527 oracle 11 58 0 656M 623M sleep 18:34 0.00% oracle
1668 oracle 113 58 0 655M 611M sleep 17:25 0.00% oracle
10523 oracle 11 58 0 656M 622M sleep 17:00 0.00% oracle
11905 oracle 11 13 0 655M 623M sleep 14:06 0.00% oracle
11891 oracle 1 48 0 654M 620M sleep 13:32 0.00% oracle
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey,
Using one single line of command i am trying to show the CPU usage for 4 processors and then filter it out and write it to a text file. Everything seams ok except that i am not able to switch from having the top command show me all CPU processes seperate opposed to showing me the average of... (8 Replies)
Discussion started by: Georgesaa
8 Replies
2. Shell Programming and Scripting
Hi ,
can some one please assist me in using top command
im facing following after using top:
# top -hv
UX:sh (top): ERROR: top: syntax error at line 1: `(' unexpected
# top -p
UX:sh (top): ERROR: top: syntax error at line 1: `(' unexpected
thanks in advance (3 Replies)
Discussion started by: NIMISH AGARWAL
3 Replies
3. AIX
Is there a 'top' command equivalent in AIX 4.2 ?
I already checked and I do not see the following ones anywhere:
top
nmon
topas (1 Reply)
Discussion started by: Browser_ice
1 Replies
4. Shell Programming and Scripting
Hi all,
I found like top command could be used to find the Memory and CPU utilization. But i want to know how to find the Memory and CPU utilization for a particular user using top command.
Thanks in advance.
Thanks,
Ananthi.U (2 Replies)
Discussion started by: ananthi_ku
2 Replies
5. Shell Programming and Scripting
Hi all,
I have the script :
top -n 1 | awk '{ if (NR==4) print $5 }'
It will return me with one memory usage : for instance
3134720k
However, I need to be returned only the number : 3134720
Does anyone knows how to fix the script that return the number (without k)
thank you (3 Replies)
Discussion started by: peuceul
3 Replies
6. UNIX for Dummies Questions & Answers
hi,
I have tried the below command in RHEL5:
top|mailx -s "test" "abc@cvf.com"
But in the mail the content was not in proper format.
Is there any way to preserve the format ?
Thanks (2 Replies)
Discussion started by: pandeesh
2 Replies
7. UNIX for Advanced & Expert Users
RHEL 5.4
What are the first things you would look for when analyzing Linux's top command output?
Below is a top output from one of our Linux machines; Do you see anything wrong?
top - 15:56:01 up 133 days, 5:55, 5 users, load average: 2.94, 2.93, 6.58
Tasks: 178 total, 2 running,... (2 Replies)
Discussion started by: John K
2 Replies
8. Shell Programming and Scripting
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
9. Shell Programming and Scripting
Hi All,
i am using the below command and once get the output and i need to keep the
first batch only.in this case how to do this one. please help me on thistop -b -n 5 >top.txt
Thanks, (3 Replies)
Discussion started by: bmk
3 Replies
10. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
acctcms(8) System Manager's Manual acctcms(8)
NAME
acctcms - Produces command usage summaries from accounting records
SYNOPSIS
acctcms [-acjnspot] file ...
FLAGS
Displays output in ASCII summary format rather than the default binary format. The acctcms command sorts its output in descending order
according to total K-core minutes. The unit K-core minutes is the amount of storage used (in kilobytes) multiplied by the amount of time
the buffer was in use. The hog factor is the total CPU time divided by the total real time. The ASCII summary output format has the fol-
lowing headings: The COMMAND NAME column specifies the name of the command. Because only object modules are reported by the accounting
system, the sh command entry specifies the entry for all shell processes, regardless of their actual names. The NUMBER CMDS column speci-
fies the total number of command invocations during the accounting period. The TOTAL KCOREMIN column combines the amount of memory used
and the length of time used. Memory is specified in kilobyte blocks, and time is specified in minutes. The TOTAL CPU-MIN column specifies
the total CPU time needed to process the command the number of times specified in the NUMBER CMDS column. The TOTAL REAL-MIN column speci-
fies the total number of real-time minutes needed to process the command the number of times specified in the NUMBER CMDS column. The MEAN
SIZE-K column specifies the average amount of memory in kilobytes used to process the command the number of times specified in the NUMBER
CMDS column. The MEAN CPU-MIN column specifies the average amount of CPU time that the command used each time it was processed. The mean
CPU minutes are obtained by dividing the total CPU minutes by the total number of commands. The HOG FACTOR column specifies the CPU time
needed to process the command the number of times specified in the NUMBER CMDS column with respect to the time required to process all com-
mands. This value shows the ratio of system availability to system utilization. The CHARS TRANSFD column specifies the total number of
characters that were read or written when the command was processed the number of times specified in the NUMBER CMDS column. The BLOCKS
READ column specifies the number of file system blocks (1 block is equivalent to 1 kilobyte) that were read when the command was processed
the number of times specified in the NUMBER CMDS column. The number of blocks read may not correspond with the number of characters trans-
ferred. Sorts in descending order according to total CPU time rather than total K-core minutes. Combines all commands called only once in
the column specified by "***other" in the COMMAND NAME column. Sorts in descending order according to the number of times each command was
called. Displays a command summary of nonprime-time commands. Displays a command summary of prime-time commands. Assumes that any file
specified after this flag is in binary format. Processes all records as total accounting records. The default binary format splits each
heading into prime-time and nonprime-time parts.
DESCRIPTION
The acctcms command outputs data in a format called TOTAL COMMAND SUMMARY. This command reads each file specified, combines and sorts all
records for identically named processes, and writes them in a binary format to the output device. Files are usually organized in the acct
file format. When you specify the -o and -p flags together, the acctcms command produces a summary report that combines commands processed
during both prime and nonprime time. All the output summaries specify total usage, except for the number of times run, CPU minutes, and
real minutes, which are split into prime-time and nonprime-time minutes.
EXAMPLES
To collect command accounting records from one or more source files into a command summary file called today and to maintain a running
total summary of commands in a file called cmtotal, add the following lines to an accounting shell script:
acctcms [source File(s) ....] > today cp total prev_tot acctcms -s today prev_tot > cmtotal acctcms -a -s cmtotal
First, the acctcms command is used to redirect command records in File(s) that you specify to a file called today. Next, the old total com-
mand summary file is renamed prev_tot. Then, the command summary records that are collected in the today and the prev_tot files are redi-
rected to a new command summary file called cmtotal. These are all binary files. The last acctcms command outputs to the default output
device the contents of the cmtotal file in the ASCII default command summary format previously described, so that the report may be dis-
played.
FILES
Specifies the command path. This is where prime time is set. Accounting header files that define formats for writing accounting files.
RELATED INFORMATION
Commands: acct(8), runacct(8)
Functions: acct(2) delim off
acctcms(8)