Questions tagged [ps]

ps is the UNIX command for retreiving process information.

From the Linux User's Manual:

DESCRIPTION
   ps displays information about a selection of the active processes.

By default, ps displays the current processes owned by the user executing the command and attached to the same process group as the shell that launches it. On most UNIX systems, the command
ps -A (or ps -e) will display information about all processes running on the system.

See also:
[unix] tag info
[process] tag info
[fork] tag info


  • For questions about the Postscript language, please use the tag instead.
  • For questions about the windows power shell, please use the tag instead.
585 questions
0
votes
1 answer

CPU usage difference between ps aux and -ef

[user@centos-vm-02 ~]$ ps aux|grep python user 4182 0.0 0.0 9228 1080 ? Ss 02:00 0:00 /bin/sh -c cd data/trandata && /usr/local/bin/python2.7 main.py >> /dev/null 2>&1 user 4190 0.1 0.1 341108 10740 ? Sl 02:00 …
Zagfai
  • 418
  • 2
  • 12
0
votes
2 answers

Linux - created processes

I'm new to Linux Shell and kind of stuck at an assignment: We're supposed to connect to a linux machine using ssh. Then we should issue the ls command and use ps and pstree to see what processes we're created in the machine to make the ls command…
stefanbschneider
  • 5,460
  • 8
  • 50
  • 88
0
votes
1 answer

Shell script to log CPU usage of a particular process without using ps aux

I am using a custom fedora distro, which does not support ps aux, hence I am finding it difficult to log the CPU usage of a particular process, is there an alternate way to measure the CPU usage apart from top or ps aux? calculating CPU usage from…
0
votes
1 answer

ps utility does not show the year a process was started

I am doing some work on a fairly old system and need to know when a couple of processes started. When I use "ps -ef" one says October 18 and the other March 23. We haven't got to October 18 this year so I'm not sure if this is October 18 last year…
MikeKulls
  • 873
  • 1
  • 10
  • 22
0
votes
1 answer

Selecting a value from output of ps -eaf

Suppose i want to select 6547 from this output of "ps -eaf" command, how do i do it? I want to select that value and give it to "kill" command to kill that process. root 6547 1 0 Aug07 ? 00:00:00 root 14805 2 0 Aug07 ? …
sattu
  • 632
  • 1
  • 22
  • 37
0
votes
1 answer

get thread count on HP-UX

how can I get thread count on HP-UX I am using ps -eLf| grep java | wc -l and ps -L -p $PID |wc -l on liunx and solaris, but it seems can't use on HP-UX I have tried ps uH p $PID on HP-UX, but it seems can't too. Does any one have solution for…
0
votes
1 answer

how to run background php process in linux and end it?

that's a very simple question I have a crawler php script. When I run a sh script: php crawler.php php crawler.php It is synchronous: it wait until first php is ended to start another one. When trying: php crawler.php & php crawler.php & That…
yarek
  • 11,278
  • 30
  • 120
  • 219
0
votes
1 answer

List pid of process that is under 24 hrs old

Using QNX I am trying to list the processes that have been running for under 24 hours. I have the following code that will list every process' PID and elapsed time running. I have tried multiple loops to list only the PID's that have 'etime'…
0
votes
0 answers

mysqld is consuming cpu constantly

my config: CPU Intel Xeon (4 kernels) 2.13 RAM 8G CentOS 6.4 kernel 2.6.32-358.2.1.el6.x86_64 mysql 5.1.67 , databases occupy about 1G and this is what i have: mysqld is consuming a lot of CPU, as soon as it is started ps -p pidof mysqld -o…
Alter
  • 33
  • 1
  • 5
0
votes
2 answers

How to get list of PID's of the processes in the group

How to get list of PID's of the processes in the group of the process which is current, using ps one line. I have tried: ps -g $$ but $$ is not group id but only PID How do I get PGID of `$$'?
Michał Dadej
  • 83
  • 2
  • 11
0
votes
1 answer

View Certain Running Scripts via PS

I need to get a list of all running PHP scripts but piping my grep through "ls" just gives me a list of all PHP files in my current directory, not the names of the currently running scripts. How do I accomplish this? I was able to get the count of…
Slinky
  • 5,662
  • 14
  • 76
  • 130
0
votes
1 answer

Groovy process not working with linux shell (grep and awk and ps)

Process proc1 ='sh -c ps -ef'.execute(); Process proc2 ='sh -c grep sleep.sh '.execute(); Process proc3 ='sh -c grep -v grep '.execute(); Process proc4 ='sh -c awk sleep.sh '.execute(); Process all = proc1 | proc2 | proc3 | proc4; // I tried this…
Ian
  • 287
  • 4
  • 17
0
votes
0 answers

android execute c program

I have an android app which calls a C program. The C program while running returns some results via printf() which should be read in by the app. The problem is when I run the C program in the adb shell it returns all printfs and terminates but when…
wasp256
  • 5,943
  • 12
  • 72
  • 119
0
votes
2 answers

PHP: How to write a message to show up in 'ps' command?

If I write a Bash shell program with a sleep statement, I can do the following to check on it's status: ps aux | grep sleep If I have a sleep occur for a long period of time, such as 10 minutes in PHP to try to see if a network connection is now…
Edward
  • 9,430
  • 19
  • 48
  • 71
0
votes
1 answer

What does this paragraph in the ps man page mean?

I could not understand the following description: a Lift the BSD-style "only yourself" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are…
Yichao Zhou
  • 465
  • 1
  • 4
  • 8