0

As mentioned here:

On RHEL 7.x, below command:

pidstat -C syslog-ng -v

does not recognise -v option

Alternative: There are two process 417880 & 417881 for syslog-ng:

# ls /proc/`pidof syslog-ng`/fd | wc -l
ls: cannot access 417880/fd: No such file or directory
50

What option is used to get number of threads & file descriptors used by a process(syslog-ng)?

0

RHEL is way behind on pidstat version. It doesn't have a -v argument.

$ pidstat -v
Usage: pidstat [ options ] [ <interval> [ <count> ] ]
Options are:
[ -d ] [ -h ] [ -I ] [ -l ] [ -r ] [ -s ] [ -t ] [ -U [ <username> ] ] [ -u ]
[ -V ] [ -w ] [ -C <command> ] [ -p { <pid> [,...] | SELF | ALL } ]
[ -T { TASK | CHILD | ALL } ]
$

-v didn't come along until version 10.2.0. You'll find that running pidstat -V on your system shows it to be prior to that.

You could use this approach to determine number of file descriptors.

$ sudo ls /proc/`pidof syslog-ng`/fd | wc -l
10
$

And this for thread count.

$ ps -o nlwp= -p `pidof syslog-ng`
   3
$
  • Which opton should I use for pidstat to get number of threads & file descriptors for process name syslog-ng? Any alternative to pidstat? – overexchange Oct 16 '18 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.