LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   sar -q and ps aux (https://www.linuxquestions.org/questions/linux-server-73/sar-q-and-ps-aux-4175445864/)

vc_neto 01-16-2013 08:51 AM

sar -q and ps aux
 
Hi!

Im my 2 nodes of oracle RAC server production database:

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)

When I try to identify how many processes are running I get the following result:

ps aux | wc -l
924

But It is totally different on sar command, look at plist-sz collumn:

1:00:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
11:10:01 AM 1 18091 3.23 3.18 3.45
11:20:01 AM 1 18088 3.47 3.10 3.23
11:30:01 AM 1 18074 3.65 3.35 3.29
11:40:01 AM 2 18068 3.43 3.45 3.34
11:50:01 AM 2 18096 3.67 3.76 3.55
12:00:01 PM 3 18094 3.90 3.56 3.48
12:10:01 PM 1 18101 2.38 3.32 3.53
12:20:01 PM 2 18113 2.78 3.01 3.21
12:30:01 PM 0 18115 1.84 2.26 2.76
12:40:01 PM 1 18134 2.30 2.41 2.61
Average: 2 17676 3.54 3.61 3.66

This number increases every day. Is there something wrong?
Is there some process increasing this plist-sz?
If yes, how to find the process is doing the plist-sz growing?

The server is new and I am affraid that Linux reachs the processes limit and stops the database.

Thanks in advance,

Neto

unSpawn 01-16-2013 09:18 AM

'ps' returns the current process table. Collected SAR data gives you cumulative statistics.
If you need to monitor the amount of processes active right now then
Code:

awk '/^procs_running/ {if( $2 > 100)print "Currently running processes: "$2}' /proc/stat
would tell you if there's more than a hundred active (or just 'grep ^procs_running /proc/stat'). If you need to collect such statistics remotely and without messing with SSH root logins also see SNMP (OID 1.3.6.1.2.1.25.1.6.0 IIGC) or any agents a monitoring tool like Monit, Nagios, MRTG or whatever else you favor may provide.

vc_neto 01-16-2013 09:30 AM

UnSpawn, Thanks for the answer,

But in other server the same sar -q command the number collect on column plist-sz keeps close that ones get by the ps command.

Server 2:

cat /etc/issue
Red Hat Enterprise Linux Server release 5.2 (Tikanga)

ps aux | wc -l
402

sar -q


12:40:01 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
12:50:01 PM 0 486 1.18 1.46 1.06
01:00:01 PM 0 486 0.79 1.26 1.18
01:10:01 PM 0 486 1.31 1.19 1.15
01:20:01 PM 2 494 0.16 0.29 0.66
Average: 1 513 0.79 0.80 0.79

uptime
13:25:02 up 33 days, 8:25, 1 user, load average: 0.05, 0.17, 0.5

Just 100 processes more and in other server I realized the same behavior.

Thanks again,

Neto,

unSpawn 01-16-2013 09:54 AM

Compare "plist-sz" value from 'sar -q' with '\ps auxH |wc -l' wrt threads?

vc_neto 01-17-2013 11:51 AM

UnSpawn,

Thanks,

These command works, I figure out that there was a oracle processes generating a lot of threads. We reboot the 2 nodes and works.

Regards,

Neto


All times are GMT -5. The time now is 06:57 AM.