ps is a command for printing information about running processes
1
vote
4answers
451 views
Call 'ps' as a normal user in Linux
A brief introduction to my question: the command ps will print the information of system processes.
But when I login as root and change the permission x of ps
chmod -x /bin/ps
chmod u+x /bin/ps
ls ...
1
vote
3answers
2k views
Why is apache2 showing up a defunct in the process list?
When I run top I see one line that doesn't look too good:
2475 www-data 20 0 0 0 0 Z 1 0.0 0:00.19 apache2 <defunct>
Why is this process <defunct> and what should I ...
1
vote
2answers
56 views
How to make sure the shell builtin echo is invoked so that its not visible in process list?
Is this going to be visible in the process listing if the below line is executed from a command line or a shell script
bash -c "echo $password"
or
i just need to do echo $password from within ...
1
vote
4answers
919 views
Using regex to see if a UNIX process is up
In UNIX, I am checking to see if a process is up by executing the following command;
E.g.
psg dtllst pe99
This returns the following output if the process is running;
UID PID PPID C ...
1
vote
3answers
177 views
I want to kill all processes that result from the following command
The following command will display all the PID's running for vmstat1:
ps -ef | grep "vmstat 1" | awk '{ print $2 }'
My question is, how do I kill them all, if there's like 20 of them at once?
1
vote
2answers
379 views
Where to find the source code for ps?
I want to check out the source code for commands such as ps. It seems to be impossible to search LXR (linux.no) for "ps". Where do I find it?
1
vote
1answer
76 views
Convert ps to pdf by ps2pdf, but the pdf file is not well-behaved
I have a ps file,and converted it to a pdf file using ps2pdf.
ps2pdf elden.ps elden.pdf
When I open the pdf file in evince, and try to select some text in it using my mouse, the selected content ...
1
vote
1answer
126 views
Linux + Solaris how to verify the last execute process from list of process
I need advice:
How to verify which is the last scan_sys.sh process that run in my linux or solaris ?
my target is to kill all scan_sys.sh process , except the latest scan_sys.sh ( the last execute ...
1
vote
1answer
58 views
How to watch pgrep?
When running a pgrep command with watch it does not only show the actual pgrep output, but also the watch process as well.
Example:
watch pgrep -lf donothing
will show 3 processes, although
...
1
vote
1answer
211 views
Bafflingly baroque Debian ps: show threads in forest tree
My favourite ps invocation is:
ps -efww ef
as I need to watch all processes (-e), get extended information about them (-f), see the environment (e) they operate within, wrapping lines (-w -w) so I ...
1
vote
1answer
63 views
'ps' command hangs
A coworker ran into this issue twice and I don't know what's wrong. His ps command hangs, taking about 25% of the CPU.
in_progress=1
sleep 10
while [ "$in_progress" -eq 1 ]; do
...
1
vote
1answer
59 views
PS tags does not work
I run a ps command inside a startup script, if I put in:
ps -A -o euser,pid...
I get this output:
EUSER PID CMD %CPU RSS SZ ELAPSED
root 644 ./code ...
0
votes
6answers
1k views
How do use awk along with a command to show the process ID with the 'ps' command
I'm able to to show the PID (2nd) column with the below command, but instead I want to show pwdx <PID> and also the COMMAND(8th) column. Thanks in advance, Chirag
ps -ef | grep runner | awk ...
0
votes
3answers
252 views
What is the difference between ps and top command?
What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?
0
votes
2answers
2k views
Frequently used “ps” (process status) commands in linux? [closed]
EDITED:
These are the the only most commonly used (and important) ps command options I've come across so far: $ ps ux, $ ps au, $ ps aux, $ ps U aahan, $ ps uU aahan
So, is that all, or am I missing ...
0
votes
2answers
150 views
Total RAM used by a program with `ps`? [duplicate]
Possible Duplicate:
Measuring RAM usage of a program
I am trying to use ps to benchmark a program, I'm just not sure which flags to use. I would like to get the amount of RAM the program ...
0
votes
1answer
63 views
What is the meaning of “\_” in output of 'ps ef'?
When I executed ps ef command in a linux server, I saw that one of the command starts with \_.
For example,
\_ /bin/sh /usr/
Could any one please let me know what is the meaning of \_ in this ...
0
votes
1answer
102 views
ps | grep shows bad output in subshell with jobs running in the background
I am using bash. I have a file named "a2draw" that contains only 1 line:
sleep 99999
I start it using this command:
bash a2draw &
Now, I know and understand the trick with square bracket ...
0
votes
2answers
133 views
receiving command as a parameter in bash
I have a following simple script called single-instance that executes the given command if there is no process under that command running. If I hard-code the command after the else statement, it has ...
0
votes
1answer
378 views
The TIME field in ps -ef
When I do ps -ef, I see "TIME" field. What does this field mean? From what I understand, this tells the actual CPU time, that the process got (amidst all the context switching). Does the TIME field ...
0
votes
2answers
38 views
`ps | grep | kill` aborts my script prematurely [duplicate]
I have a Linux computer that I remotely SSH into using plink on a Windows XP machine. I have the Plink program set to execute commands in a script using automated login:
plink -ssh [domain name] -l ...
0
votes
0answers
26 views
How can I see a process' thread count? [duplicate]
Possible Duplicate:
Is there a way to see details of all the threads that a process has in Linux?
I want to see the thread count which belongs to a process in linux. What command should I ...
0
votes
0answers
96 views
Very large values for utime and stime for foo. Is foo still running?
I am running a program foo
It has been running for close to 30 days now (even more)
Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
-3
votes
2answers
354 views
Please explain this output of ps -ef command?
A part of the output from the ps -ef command is given below :
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 2012 ? 00:00:01 init [3]
root 2 ...
