Questions tagged [ps]

For questions pertaining to ps, a command for printing information about running processes. Use this tag for questions about ps itself or questions about issues arising from using the ps command-line utility.

Filter by
Sorted by
Tagged with
1
vote
3answers
6k views

ps command - list all processes with given command regardless of user

I want to see a summary of all 'php-fpm' processes, regardless of the user running them. As I understand from man ps, it normally only looks at processes your current user started in a terminal. So ...
5
votes
2answers
477 views

Why would pgrep not show my processes but sudo pgrep does?

I looked at a list of processes and filtered out ssh-agent which correctly shows the 3 processes I expected: $ ps -ef | grep ssh-agent belmin 1051 1 0 16:05 ? 00:00:00 ssh-agent -a /...
2
votes
1answer
592 views

Why is ps -u command not working?

When I use the 'top' command I get 10366 mithus 25 0 11120 1044 884 R 99.9 0.0 67:14.35 gm when I start a process using nohup ./gm &. showing that a process 'gm' is running. ...
0
votes
1answer
263 views

hp-ux ps,what the difference between sleeping and waiting?

On hpux ps -efl I see on output the letter S,which mean "state of process" I see voices like S(sleeping) and W(waiting) I know(hope is correct) Sleeping mean "waiting for event",but what does it ...
4
votes
2answers
8k views

What is meant by pts/0 and pts/1 in the output of ps -aux?

I am reading the book Unix Power Tools, and came across the ps command. The output of command ps xas given in the book is : PID TTY STAT TIME COMMAND 18034 tty2 S 0:00 -zsh 18059 ? S 0:01 ssh-...
9
votes
1answer
5k views

Get PID from TID

I run iotop to check on programs that are heavy disk users, in case I need to decrease their priority. Usually this is good enough, but iotop only shows thread ID (TID), and sometimes I want to know ...
1
vote
1answer
95 views

What is this, how to obtain information about a process ID [duplicate]

How can I get more information than what top shows me about a process? I currently have a process that displays as j and has the CPU running at +2400%. Searching for j yields no results. Here's an ...
-1
votes
2answers
2k views

How can I list of PID's of all processes running within a directory?

I want to list all processes that are running in a directory. For example, let's say 3 three processes are running: /home/myname/myapp/process1 /home/myname/myapp/process2 /home/myname/myapp/...
3
votes
2answers
4k views

ps: format (separator and width)

I'd like to specify the column-separator ps -o "%a|%p" # separator | and the column-width ps -o cmd:50,pid # width 50 for cmd in one command. Is this possible?? It is not about the ...
0
votes
1answer
2k views

ps -fu $USER … but shorter

I like ps -fu $USER it displays all processes of the current user and displays enough information per process. But I am lazy and would like to have a shorter solution. I know aliases and they are ...
1
vote
1answer
40 views

Process is running [closed]

I have run the following command as root today morning sh /home/suio/LoadSnortSingature.sh > /home/suio/logs.txt 2>&1 after some time the session of the terminal closed and I have relogged in ...
6
votes
2answers
6k views

How to disable one CPU

I'm trying to disable some CPUs of my server. I've found this link: https://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/linux-turn-on-off-cpu-core-commands/, which offers me a ...
-1
votes
2answers
3k views

How to see the processes not attached to the terminal in ps aux?

When I do ps aux, I see a lot of processes. If I just do the ps ux still lot of processes. How do I differentiate or can see which processes are not attached to the terminal ( as 'x' in 'aux' defines ...
0
votes
3answers
82 views

Matching for program names, why so many hits?

In my box, the code /bin/ps -aux | /bin/grep -c "blynk"returns a 1 because blynk server is not running. However, when the same code is ran in a bash file, it returns 4. How does that happen? #!/bin/...
0
votes
1answer
513 views

`ps` showing much higher ram usage than `htop`

I usually monitor my server resource usage. I am using htop for monitoring. When running htop the memory usage is 1.3G, which is fine for me. But I tried to view the memory used by each process. For ...
22
votes
1answer
4k views

What does `I` (uppercase i) mean in `ps aux`?

In man page of ps under Process State Codes, the I flag (capital i) is not mentioned but ps aux shows the I flag in some processes as shown by the image below. What does the I flag mean?
0
votes
1answer
178 views

Why regular expression doesn't match input with sed command [duplicate]

I'd like to cut extra spaces from "ps aux" output and replace them with one space. What I do is: ps axu | sed 's/[ ]+/ /g' But output seems to be unchanged, I still get too much spaces between ...
3
votes
1answer
602 views

Submitting “ps” across multiple servers, output going to one text file

I'm trying to build a script that'll output all defunct processes across 66 redhat boxes to a single text file. I understand the principles of doing this on one box, but I'm not sure how to shoehorn ...
0
votes
1answer
252 views

ps -vxa doesn't sort regarding to memory

The FreeBSD manpage to ps says: -v Display information associated with the following keywords: pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz, %cpu, %mem, and command. The -v ...
1
vote
2answers
110 views

How to get the system task summary given by top without using top?

top displays these numbers in its summary: Tasks: 193 total, 1 running, 192 sleeping, 0 stopped, 0 zombie I'm looking for a way to get them some other way -- running a program, parsing a /proc ...
0
votes
1answer
58 views

Analogue of `top -b` for `ps`

There is a command I use top -b | grep <searched text> to monitor some proccesses. Also, I need some analogue of this command for command ps aux | grep <searched text>. I mean I would like ...
0
votes
1answer
481 views

Process Id Using ps ax command

I have used: ps ax |grep chrome That gave the following along with other details: 6254 ? SLl 0:01 /opt/google/chrome/chrome 6265 ? S 0:00 /opt/google/chrome/chrome --type=...
1
vote
2answers
929 views

Proper and reliable way to check for a running process on AIX 7.1.0 in KornShell

I have been trying to get a way to check whether a script is running or not, because I want to ensure that there aren't any other instances when I run something. So far, I have tried with this: #! /...
15
votes
5answers
4k views

Hide arguments to program without source code

I need to hide some sensitive arguments to a program I am running, but I don't have access to the source code. I am also running this on a shared server so I can't use something like hidepid because I ...
1
vote
1answer
544 views

ps command return nothing in function

I have a function which required some process ID that needs further action. I tried to get it via command PID = $(ps axf | grep SOME_PATTERN | grep -v grep | awk '{print $1}') And it works on ...
1
vote
1answer
6k views

AIX - using egrep for pattern matching of multiple string including variables

I am trying to come up with an egrep command that can do pattern match a set of strings and variables. So far, I am using the following: ps -ef <uid> | egrep "string1|string2" | egrep -v "...
6
votes
3answers
4k views

How can I increase the ps column width for column “user”?

I like this pattern ps aux | grep something. This way I can find the needed information easily without remembering command line options for the ps command. Unfortunately the ps commands cuts the ...
10
votes
4answers
7k views

ps output with iso date format?

I'd like to sort this output by lstart (start of process): ps -eo lstart,pid,cmd Is there a way to output lstart in ISO format like YYYY-MM-DD HH:MM:SS? But sorting alone does not solve it. I ...
1
vote
1answer
3k views

ps cuts command, how to get full

If I run the following command, the command line is cut: user@host:~$ ps -eo pid,cmd,lstart Output: 6382 /home/user/bin/pyt Sun Oct 22 18:51:39 2017 How to get the whole command (inclusive all ...
-1
votes
1answer
3k views

process command with -U

ps -f -U I am not able to understand the functionality of this command. I am getting output for the above mentioned command, but not able to understand it.
1
vote
2answers
78 views

number of executions of script [duplicate]

I am trying to find number of runs of a script but its always 2 even though only one running. sh 11.sh 1 11.sh already running,exiting.. here is code. ps -ef | grep -v grep | grep -c "$0" if [[ `...
0
votes
1answer
45 views

Could a process appear in top actually got stuck?

Could a process appear in top actually got stuck? Besides, I have read a post here a command ps -o s= -p <pid> could show stopped process if the output is T. I tried the command with various ...
0
votes
2answers
97 views

Can't find Cron-Initiated Processes Initiated on Amazon EC2 Server

On my remote Amazon EC2 instance, I've scheduled a Cron job to run a program once every hour. The program takes about 55 minutes to run, and sends me an email when it starts and when it stops. It has ...
1
vote
1answer
606 views

process is not using new open file configuration which I have set?

I have a process which is running as golden user and I am trying to increase the open file limit for that user so that all the process that gets started up by that user, it should uses that settings. ...
4
votes
2answers
20k views

How do I kill the process holding the apt lock?

I tried doing sudo apt update but got: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ I am trying to get ...
1
vote
3answers
727 views

Killing a cron process and preventing it from relaunching

I have a cron entry that gets stuck which I cannot break out of. The cron job launches a script which runs our nightly jobs for our application system. The script submits asynchronous jobs in the ...
2
votes
0answers
199 views

Strange behaviour of “ps aux” in the CPU time column

I am periodically running "ps aux" that outputs values in a following format: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND If I understand TIME is a cumulative CPU time, ...
71
votes
3answers
6k views

How does curl protect a password from appearing in ps output?

I noticed some time ago that usernames and passwords given to curl as command line arguments don't appear in ps output (although of course they may appear in your bash history). They likewise don't ...
4
votes
0answers
81 views

several eps to ps

I have a bunch of eps vector images (btw... they are generated from dxf), and want to stack them on a single ps so I can print them on a single sheet. The eps files share the same dimensions but have ...
1
vote
1answer
1k views

Filter out and kill non-docker processes

I have some processes that I am running both locally and within docker containers on the same host. Since I run multiple processes with the same name, I would like to make an alias/function that would ...
0
votes
1answer
1k views

Background processes

I have a script that needs to be run on background, if I run the same script on foreground, the script runs good and it wont stop until we manually interrupt (ctrl^c). I am sure that the below ...
1
vote
2answers
180 views

Is it possible to get a PWD column in top output?

I know about pwdx, but it would be really nice if top showed the PWD: in other words, I want to see PWD and CPU/mem usage side by side. Does anyone have a script or one-liner to combine the output ...
1
vote
0answers
83 views

time required to wait for lock using ps commands

How can we determine that how much time each thread has to wait for acquiring the lock in a multi-threaded application using ps command?
0
votes
1answer
394 views

What does parent process -bash mean?

I have a process, x, which has the PPID (listed by ps) or the process -bash started about a month ago.. myuser+ 11861 11858 0 Jun13 pts/178 00:00:00 -bash myuser+ 16321 11861 8 Jun13 pts/178 2-01:...
1
vote
2answers
905 views

How to group processes with the same name

How to display list of all processes preferably (with no ps header line) where processes with the same name are grouped together? ps -A | tail +2 prints the processes without the header but I can ...
1
vote
1answer
1k views

Pipe PID of certain UNIX processes into ls -l

I run SAS codes through bash. So when I do a ps -u <user-id> ..(1) I get the following: UID PID TTY TIME CMD 327208 921620 - 0:00 sftp-server 327208 1409136 - 0:00 sshd ...
15
votes
1answer
11k views

Working solution for ``watch ps aux | grep foo`` [closed]

watch ps aux | grep foo is not working: bash: syntax error near unexpected token `}' How can I fix this or is there even a better way?
19
votes
1answer
46k views

How to make ps command show memory in mb instead of kb?

Linux ps command shows different memory usages like rss, size in kb by default. Is there a way to show in mb or gb like ls -s --human-readable does?
0
votes
1answer
124 views

Text wrapping in Terminology

I just installed Enlightenment in OpenSuse Tumbleweed via YasT. I'm using E as the WM and entrance as the DM, if it matters. While checking its terminal emulator Terminology, I noticed that output ...
2
votes
2answers
6k views

ps command shows user id and not user name

With Centos 6.6, when I run ps command, the first column is User ID and not user name. root@cluster:mahmood# ps aux | grep Xvnc 506 11881 0.6 0.1 168580 63164 ? S Jun03 24:56 /usr/...

1 2 3
4
5
11