We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2017-04-28 15:56:03 +0200

how to count specific process with cli?

Hello all,

i would like to count the number of process in terminal.
I don't know exactly how to do this.
After informing into internet, i may use the combination of ps with grep.

I tried:
ps -aux | grep process_name

And i get all the lines of process with the defined name.
Normally grep has the option -c to count the lines, but it doesn't work here. why?
With -n seems that i get the line number and the line. Do i have the info that i need?

There is no possibility to check command man-page? with man. nor alternative?

Could someone help me for this please?
Thank you very much in advance.

Cheers

how to count specific process with cli?

Hello all,

i would like to count the number of process in terminal.
I don't know exactly how to do this.
After informing into internet, i may use the combination of ps with grep.

I tried:
ps -aux | grep process_name

And i get all the lines of process with the defined name.
Normally grep has the option -c to count the lines, but it doesn't work here. why?
With -n seems that i get the line number and the line. Do i have the info that i need?

There is no possibility to check command man-page? with man. nor alternative?

edit. commands which work:
ps aux | grep process_name | wc -l
ps aux | grep -c process_name
Should be no '-' before 'aux'

Could someone help me for this please?
Thank you very much in advance.

Cheers