Questions tagged [ps]

ps is a Unix operating system command and the like used to display the running processes.

Filter by
Sorted by
Tagged with
1 vote
1 answer
5k views

what does CPU% means in `ps auxf` for processes with parent/child relationship?

When I use ps auxf to display process information with ASCII art process hierarchy. Processes with parent/child relation is listed as below. USER PID %CPU %MEM VSZ RSS TTY STAT START ...
cizixs's user avatar
  • 113
0 votes
3 answers
1k views

Cygwin: Get process state

When I run top in Cygwin I get: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND I would like to extract these columns for all processes: PID PPID S COMMAND ps gives PID, PPID, ...
Ole Tange's user avatar
  • 4,789
1 vote
1 answer
965 views

how to view all process details from ps –ef command

I am using the ack.pl in my bash script to search IP's in the Linux OS only for example , and only to show the problem I will give here a short example # ( ./ack.pl -Q -a -l --max-count=1 --...
maihabunash's user avatar
4 votes
1 answer
553 views

What does the suffix letter mean in the PRI column of "ps -M pid" under MacOS/X?

When I execute this command under MacOS/X: ps -M 9358 I get this output: USER PID TT %CPU STAT PRI STIME UTIME COMMAND jaf 9358 s009 0.0 S 31T 0:00.21 0:00.32 /Users/jaf/...
Jeremy Friesner's user avatar
1 vote
1 answer
2k views

How to filter processes with "ps" to match all conditions?

In Linux, if I use ps --user john -C processname, then I get all processes owned by the user and in addition all processes named processname. Is there a way to modify the behavior to get only ...
Black's user avatar
  • 173
0 votes
1 answer
11k views

How to get memory usage of a Minecraft server?

I am creating a Minecraft control panel at the moment and having trouble by getting the memory usage of the process. My current process: launch the server in a screen get the pid of the screen ...
NickoLimited's user avatar
0 votes
1 answer
2k views

How to find the total number of processes in Unix/Linux shell script

I’m trying to find the total lines of running processes excepting the commands I’m using to create the listing. Then to parse out the userID and the PID into a new list. All within the same shell. ...
Cidricc's user avatar
  • 483
1 vote
0 answers
159 views

How many volumes should I add in my btrfs?

How much overhead does a single physical partition add to a btrfs volume? ps aux | grep btrfs | wc -l results in 102. I have 4TBx4 in my NAS and 16GB RAM and Core i3 processor. The NAS also hosts a ...
Lord Loh.'s user avatar
  • 1,024
4 votes
2 answers
14k views

ps aux status column meaning?

On a Mac, 64 bit, osx 10.8.5, two of my ps aux output lines, plus the header, are ; $ ps aux | head USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND myuid ...
AnneTheAgile's user avatar
0 votes
2 answers
5k views

How can I find wget processes older than one day in unix?

Using this command I can find all the processes for wget: ps -aef | grep -i wget But I want a command or a script which can provide me the processes older than one day for wget and kill them.
ravi kumar's user avatar
77 votes
2 answers
12k views

Is "ps -u" Really a Bad Syntax?

IMHO ps -u shows a very useful output, much better than ps -u $USER: $ ps -u Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ USER PID %CPU %MEM VSZ RSS TTY ...
sjngm's user avatar
  • 2,111
4 votes
1 answer
16k views

How to print with ghostscript in silent mode

I am using the following Ghostscript command to print a postscript document: C:\Program Files\gs\gs9.14\bin>gswin64c.exe -sDEVICE=mswinpr2 testprinter.ps This command opens a Print dialog where I ...
Chaitanya MSV's user avatar
1 vote
2 answers
1k views

two processes are listed for one shellscript?

I have a shell script which does somewhat simple. #!/bin/sh do something boring... When I execute the shell script like this, $ nohup sh mysh.sh > /null/dev/ 2>&1 & I see there are ...
Jin Kwon's user avatar
  • 336
7 votes
4 answers
6k views

Finding all not responding tasks from the command line in Mac OS X?

I know I can do ps -aux | xargs kill etc but I want to list the PIDs of all tasks that are not responding (the red ones in Activity Monitor). What command I can execute in the terminal to list these ...
pathikrit's user avatar
  • 353
0 votes
1 answer
2k views

Interpretting COMMAND column of `ps aux | grep redis`

When I run ps aux | grep redis, with a running redis server, the COMMAND column shows redis-server *:6379. 6379 is the port number, but what's the *: for? Is it saying 'Hey, this is a port number", or ...
ivan's user avatar
  • 1,055
10 votes
3 answers
11k views

watching output of "ps aux | grep blah" in tmux will not work?

I am trying to run this - watch "ps aux | grep myShittyProcess" in a tmux session. This process myShittyProcess was also started in a tmux session. The ps aux works without watch command. But as ...
Shrinath's user avatar
  • 231
1 vote
1 answer
215 views

Show last 5 opened processes in terminal?

I am trying to have a terminal showing the last 5 processes opened. This is helpful for my debugging. At this point I have watch ps -ef --sort=start_time This works fine but it shows all processes ...
Pithikos's user avatar
  • 1,604
0 votes
1 answer
773 views

USER field in ps command(android env)

In android environment, What does USER in the ps command indicate? ps USER PID PPID VSIZE RSS WCHAN PC NAME root 1 0 748 608 c0267708 0001b95c S /init Here ...
Sandeep's user avatar
  • 633
0 votes
1 answer
131 views

What does ps axuwfw return?

I am getting strange output including my old makefile output and process tree when running below command on linux ps axuwfw Also, what is the usefulness of the following command and how does it ...
manav m-n's user avatar
  • 353
1 vote
1 answer
2k views

What is the AIX's `ps -T PID` equivalent for Linux?

I really like the way ps -T PID works on AIX. It shows you a nice tree of processes in the right side, and their PID, PPID and other info in the left side. In AIX docs, the -T flag reads Displays ...
jimm-cl's user avatar
  • 1,919
0 votes
2 answers
1k views

Getting pid of process not listed in ps -ef

I know there is a process called blt.pl running on a particular machine but not quite sure which user is running it. i have tried ps -ef | grep -i blt.pl but obviously it's not finding it. Is there ...
ealeon's user avatar
  • 119
0 votes
1 answer
116 views

can I `dtach` or `renice` graphical programs like `evince`?

I sometimes open PDF's and then want them "sort of" open "to read later", but I'm not looking at them at the moment. While I'm not looking at them I'd like the OS to spend less effort keeping them up. ...
isomorphismes's user avatar
0 votes
1 answer
3k views

Red Hat seeing all processes and detail information about them

im on a red hat server and i did ps -a and see all running processes. CMD> ps -a PID TTY TIME CMD 1857 pts/5 00:00:00 ps 9011 pts/1 00:00:00 su 9097 pts/1 00:00:00 csh 20515 ...
ealeon's user avatar
  • 119
1 vote
2 answers
10k views

How to access different tty session

I wanted to know if there is any possibility of login to other tty sessions. Someone has mistakenly changed the root su password. One of the session is already logged in as root. So any possibility ...
maneeshshetty's user avatar
2 votes
1 answer
92 views

Why can ps know about the process that runs after it?

[root@myvm1 ~]# ps aux | grep ls root 13594 0.0 0.1 3912 672 pts/1 R+ 09:46 0:00 grep ls In the above, the ps aux runs first and its output is then redirected to the grep ls command. ...
bobo's user avatar
  • 1,829
0 votes
1 answer
84 views

Is there a version of kill with feedback?

Is there a fork or easy mod of the linux kill command to provide feedback? I'd like to avoid the cycle of: ps acx | grep rogue_agents killall rogue_agents # alternately, kill 007 ps acx | grep ...
bright-star's user avatar
  • 1,589
5 votes
3 answers
7k views

how do I continuously do a ps auxw on OSX?

The question is this: If I open terminal and type ps auxw, I see a list of all processes running but this command is like a snapshot of that instant. What I need is this: I am trying to discover what ...
Duck's user avatar
  • 1,757
1 vote
0 answers
413 views

Using systemd-cgls and cgroups as a user configured pstree

When using pstree I was annoyed that processes forget their grandparent process when they get orphaned since they get adopted by init, so I thought maybe I could use systemd-cgls and cgroups, since an ...
Matthew Cline's user avatar
1 vote
2 answers
19k views

How to get a list of background processes in freebsd

I need to get a list of background processes in freebsd, but i don't know how. I've tried to use ps command, ps -ax ps -e -j but I haven't found properties which describe background processes. +...
Aleksander Korovin's user avatar
22 votes
4 answers
29k views

Is it possible to format ps RSS (memory) output to be more human friendly?

Executing ps ux returns a nice list of process information, easy to grep through or watch. However, there doesn't seem to be much flexibility in the memory usage output; the RSS (resident set size) is ...
metasoarous's user avatar
0 votes
0 answers
952 views

Why I can kill a process with Sl STAT but not process with R+ STAT?

I am trying to figure out why I can stop a firefox (for example) process with STAT Sl, but not one with R+? I've got the following: # ps aux | grep firefox root 14671 0.0 0.1 63824 1196 ? ...
user263683's user avatar
0 votes
1 answer
151 views

New process being created while checking with 'if' in bash

ps -ef | while read line; do for i in $line; do if [ $i = 'bash' ]; then echo $line; fi; done; done; unset i; The command runs properly displaying the Bash ...
Solomon's user avatar
4 votes
1 answer
1k views

How can I graph memory usage by user?

Basically, I want to graph the memory usage with each username as title, as time passes by. I would set that script as a cron job, to create a graph that shows memory usage of certain usernames. How ...
Savvas Radevic's user avatar
7 votes
2 answers
16k views

ps and top give different CPU usage

I've seen a few posts similar to this, most notably here, but wasn't quite satisfied with the answers. I'm comparing top and ps results on a specific process and see huge discrepancies in CPU usage. ...
TTT's user avatar
  • 431
0 votes
1 answer
41k views

"ps -ef | grep java" using java program [closed]

I'm attempting to execute ps -ef | grep java through java program. Here is my code- // String sudoScript = "sh -c \"ps -ef | grep java\""; String sudoScript = "ps -ef | grep java"; try { ...
AlwaysALearner's user avatar
1 vote
1 answer
4k views

What memory statistics does Linux' ps command really display?

Consider the following pmap output of a simple tail process on Linux: $ pmap -x 3974 3974: tail -F /var/log/syslog Address Kbytes RSS Dirty Mode Mapping 0000000000400000 60 ...
Dolda2000's user avatar
  • 1,203
0 votes
2 answers
2k views

Please explain the ps -aef on rhel

What does pts/2 indicate in the output below? Why there is no such for other dd processes? $ ps -aef |grep dd root 6553672 15073352 3 02:32:19 - 0:01 dd of=/dev/lv01 bs=1024k padmin ...
Ratnakar's user avatar
6 votes
1 answer
6k views

What units does `ps -o` report memory usage in?

I'm using a script - memusg - to report the peak memory usage of my rails app. The script uses ps -o to measure memory usage. My question is: what units does ps -o report memory usage in? The script ...
user2574255's user avatar
1 vote
2 answers
477 views

How do I extend unix "ps -ef" command to see more info

I need to grep process by information containing in CMD column, but this column strings is cut(limited) and needed info is lost. Please suggest how can I enlarge string size allowed for CMD column.
user590444's user avatar
0 votes
2 answers
1k views

Start java process with different names?

I have 2 eclipse and 2 servers running If i make a ps -C java i see something like: 2460 pts/1 00:03:08 java 2908 pts/3 00:00:05 java 3045 pts/4 00:00:17 java 3284 pts/3 00:01:40 java ...
Joergi's user avatar
  • 143
1 vote
2 answers
816 views

remove the zombie process from the output of ps

I m not looking to kill a zombie process. I m looking to avoid the display of zombie process in the ps command. Are there an option to add to ps command inorder to avoid displaying the zombie ...
Mohamed KALLEL's user avatar
1 vote
1 answer
219 views

How to determine full command with args given a pid (or port in use)

I've got this nice bash function for telling me the pid using a port: using_port() { lsof -i:${1} } Output looks like this: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ...
justingordon's user avatar
  • 1,613
4 votes
2 answers
9k views

Virtual memory usage vs resident set size

When I launch php-script and do ps aux and have huge number for VSZ, about 450MB. Whilst RSS -- Resident set size -- is about 10MB. From wikipedia, Resident set size is is the portion of a process's ...
Vadim Samokhin's user avatar
1 vote
1 answer
138 views

Linux Command to display only mingetty's info

I am looking for a command that will give only mingetty's information. How can you construct the command to find only mingetty data and find the PPID in Linux?
Jose Hernandez's user avatar
0 votes
0 answers
885 views

Name of Rake task in ps output?

pid = `ps -ef | grep -v grep | grep rake | awk '{print $2}'` This is a bunch of ruby code that executes piped linux commands. While I usually just use ps aux, just because, I noticed that the rake ...
pjammer's user avatar
  • 781
1 vote
1 answer
2k views

What determines the process name in ps aux?

I'm trying to track down this script called ./launch.sh, that on my machine is currently in an infinite loop in which it calls a Java program, immediately crashes, then sleeps for 3 seconds. ps aux ...
djechlin's user avatar
  • 168
0 votes
0 answers
849 views

Which processes were running yesterday?

We have a production machine that keeps crashing on regular basis. Our staging environments run fine, but when the application is deployed to production, the production machine crashes after two or ...
divinedragon's user avatar
1 vote
1 answer
1k views

awk - max value of a rolling average

I have a bash command which gives me the highest value in the 9th column of a file: cat "log.txt" | grep 1923 | awk '{print $9}' | sort -n | tail -1 log.txt is a log of CPU usage for process 1923 &...
Fidel's user avatar
  • 473
23 votes
4 answers
44k views

How to get only the user, the pid and the command run for a specific process? (Ubuntu 11.10)

When I do ps -ef|grep python I get the following: myusername 4492 2994 0 10:32 pts/0 00:00:01 /home/myusername/.virtualenvs/myproject/bin/ipython manage.py runserver root 6665 1 0 ...
Bentley4's user avatar
  • 1,928
6 votes
1 answer
3k views

ps comm format always cuts the process name

I am trying to invoke ps -o comm:1024 --pid 1391 --cols 1024 -w in the hope of getting the full process name (and only that), but I always end up with this COMMAND notification-ar while the process ...
Stefano Borini's user avatar