A process is an instance of a computer program that is being executed.

learn more… | top users | synonyms (1)

4
votes
5answers
373 views

Getting the pid's of a program line by line

I can find the pid's of my program instances by issuing command like this: pidof avconv Which is giving me results 16616 16283 16279 16198 16175 16035 15073 14049 4922 But how can I output the ...
1
vote
0answers
22 views

How do processes, jobs and session relate to each other ? [duplicate]

Could you deliver an answer in a way that does not require too much special knowledge in advance, yet also deliver some deeper insight to a lesser advanced Linux User ?
2
votes
2answers
21 views

Can someone explain exactly what is happening with single quotes and double quotes with process IDs in the below example? [duplicate]

[root@localhost ~]# echo $$ 16991 [root@localhost ~]# bash -c "echo $$" 16991 [root@localhost ~]# bash -c "echo $$" 16991 [root@localhost ~]# bash -c 'echo $$' 21062 [root@localhost ~]# bash -c 'echo ...
0
votes
2answers
937 views

How to compute Linux slab memory leak in GNU/Linux ( proc/slabinfo ) of running process

How to compute Linux slab memory leak in GNU/Linux ( proc/slabinfo ) of running process ? I'm want to free usage is not working properly . I want to way how to check Memory Usage & Memory Leak ...
1
vote
2answers
33 views

List running processes without procfs

I'd like to list running process (like using ps or top), but there is no procfs mounted. The procfs not being mounted is intentional, and is made to prevent malicious user to access systems ...
27
votes
5answers
6k views

Who's got the other end of this unix socketpair?

I want to determine which process has the other end of a UNIX socket. Specifically, I'm asking about one that was created with socketpair(), though the problem is the same for any UNIX socket. I ...
5
votes
3answers
486 views

Dynamic file content generation: Satisfying a 'file open' by a 'process execution'

I have a read-only file, F. A program, P, that I'm not the author of, needs to read F. I want the content of F to come from another 'generator' program, G, whenever P tries to read F (taking F to ...
1
vote
1answer
534 views

How can I kill child processes with start-stop-daemon?

I'm writing a simple web server using nc and bash. It looks like this: #!/bin/bash rm -f /var/run/streamman/out mkfifo /var/run/streamman/out trap "rm -f /var/run/streamman/out" EXIT while true do ...
2
votes
1answer
1k views

How is it that I can attach strace to a process that isn't in the output of ps?

I'm trying to debug why our integration tests are taking so long and it looks like they're hanging part way through. I logged onto our test service and saw the following behaviour: root@colossus:~# ...
1
vote
0answers
39 views

How can I find which process is eating my memory? [duplicate]

My Linux system sometimes reaches 90% memory usage. We are running some Java processes, and top shows overall usage as 45%. If I stop the running processes, usage reduces to 5-10%. I want to list ...
2
votes
1answer
21 views

Re-enter PID 1 namespace

I'm trying to enter PID namespace that process with PID 1 is in from a process cloned with CLONE_NEWPID. I keep getting Invalid argument error. In other words, I clone a child process with clone() ...
24
votes
9answers
2k views

How can I kill a process and be sure the PID hasn't been reused

Suppose, for example, you have a shell script similar to: longrunningthing & p=$! echo Killing longrunningthing on PID $p in 24 hours sleep 86400 echo Time up! kill $p Should do the trick, ...
2
votes
1answer
19 views

Solaris 10 system - used disc space keeps on increasing even after deleting the directory

I deleted a directory on slice mmf but it came back - the size is still same and also it keeps increasing. The reason for deleting the directory is that I couldn't find the process linked to creating ...
2
votes
1answer
26 views

Is there a way to suspend an process belongs to shell A and foreground it in shell B?

I knew how to suspend one process and bring it into foreground in current shell, but I have no idea about that If I have run a process in shell A and now I want to bring it into foreground in current ...
28
votes
5answers
8k views

Measuring RAM usage of a program

time is a brilliant command if you want to figure out how much CPU time a given command takes. I am looking for something similar that can measure the max RAM usage of the program and any children. ...
1
vote
1answer
37 views

Difference between owner/root and RUID/EUID

I am relatively new to the concepts mentioned in the question and reading about them from different sources only makes them more confusing. So this is what I understood so far: When we are given ...
2
votes
3answers
129 views

How can I determine if a process is a system process?

I'm reading the /proc directory (or pseudo-fs) to find all processes. I'm getting the information I need from /proc/[pid]/status but there's something else I need. Is there any way to figure out which ...
1
vote
0answers
13 views

Find what process implements a FUSE filesystem

How can I get the process ID of the driver of a FUSE filesystem? For example, I currently have two SSHFS filesystems mounted on a Linux machine: $ grep sshfs /proc/mounts host:dir1 ...
19
votes
5answers
6k views

Is there a program that can send me a notification e-mail when a process finishes?

I am a computational scientist, and I run a lot of lengthy calculations on Linux. Specifically, I run molecular dynamics (MD) simulations using the GROMACS package. These simulations can take days ...
8
votes
3answers
20k views

How to list processes locking file?

Using flock, several processes can have a shared lock at the same time, or be waiting to acquire a write lock. How do I get a list of these processes? That is, for a given file X, ideally to find the ...
11
votes
2answers
3k views

How do I tell a script to wait for a process to start accepting requests on a port?

I need a command that will wait for a process to start accepting requests on a specific port. Is there something in linux that does that? while (checkAlive -host localhost -port 13000 == false) ...
1
vote
2answers
38 views

Should I use Linux's acct (BSD process accounting) to track a process behavior?

I have a daemon process (slapd) which sometimes stops with no apparent reason. No segfault occurs. Nothing special in the logs. So, I'm trying to use acct to track the process' life, especially its ...
7
votes
3answers
2k views

Process descendants

I'm trying to build a process container. The container will trigger other programs. For example - a bash script that launches running background tasks with '&' usage. The important feature I'm ...
5
votes
3answers
8k views

Bash script wait for processes and get return code

I am trying to create a script which will start many background command. For each background command I need to get the return code. I have been trying the following script : #!/bin/bash set -x ...
0
votes
1answer
28 views

writing a script & trying to kill a process

So I am very new to Unix, I understand this question may be very simple My goal is to write a script that will show all the running processes and ask the user if they want to kill each process... For ...
3
votes
5answers
84 views

Get PID of process started by time

Say I run time ./a.out, then I can get the PID of time by the variable $!. But how do I get the PID of a.out? Of course, I could parse the output of ps, but I want a more elegant solution. I've ...
5
votes
3answers
407 views

Which of the following codes will run in the same process of the current shell

A. { echo "Hello World"; } >outputfile B. ( echo "Hello World" ) >outputfile C. ./anothershell.sh D. /bin/echo "Hello World" Which is right? And what kind of command can run in the same ...
1
vote
0answers
165 views

Does jps lie? If not, what else is this?

I am running dockerized hadoop cdh 4.6.0 with supervisor . I have opened the docker container and tried the following two commands. Got confused a lot. jps 103 -- process information unavailable ...
5
votes
4answers
376 views

list graphical processes from terminal

Do no confuse the question here with how to list processes graphically, that is not what I am asking. In the Terminal, how can i see which processes have a GUI? as in things like firefox, vlc, ...
3
votes
2answers
215 views

How to close a window of a crashed application?

Im using Awesome as desktop environment, as you can see in the image below, the application (aMule) crashed but the window is still open, so I would like to close it to restart it, but as you can see ...
0
votes
1answer
76 views

/usr/bin/awk: Argument list too long

I am trying to run the following bash script: #!/bin/bash file=$1 filename=${file%%.*} line1=$(sed -n 1~2p ${file}) seqs=$(grep -v '^>' ${file}) pos=$(echo "${line1}" | awk -F"[__]" ...
0
votes
0answers
15 views

Perform task on waking up from suspend

I have program that misbehaves when my pc wakes up from suspend to ram, it starts using up to 40% of processor time so i usually have to kill it manually. How can i set specific command (pkill in ...
2
votes
1answer
47 views

monitor multiple pids with top

I want to monitor memory usage for several processes and came up with a command like this: ps aux |grep -e postgres -e unicorn -e nginx|cut -d' ' -f2|for i in $(xargs); do echo $i; done 16112 16113 ...
0
votes
2answers
33 views

How to open process again? [duplicate]

From my home pc using putty, I ssh'ed into a remote server, and I ran a python program that takes hours to complete, and as it runs it prints stuff. Now after a while, my internet disconnected, and I ...
2
votes
3answers
73 views

Can you make a process pool with shell scripts?

Say I have a great number of jobs (dozens or hundreds) that need doing, but they're CPU intensive and only a few can be run at once. Is there an easy way to run X jobs at once and start a new one ...
0
votes
2answers
38 views

Meaning of the pstree output

-bash-3.2$ pstree 27108 Script.sh---java---15*[{java}] What does this 15* mean here, also any meanings defined for [] & {} in the context of command?
1
vote
1answer
21 views

How to find process which flood the whole network

I have a laptop with Fedora 21 and TP-Link router with DD-WRT software. Sometimes my whole internet stops for any device. When I reboot my laptop or just I turn off wireless, the internet works fine. ...
1
vote
1answer
58 views

shell script to auto kill processes matching certain criteria

when running top it shows a couple of processes got nearly 100% cpu usage of the command 'perl' PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 21287 simon 15 0 4141 ...
1
vote
0answers
11 views

Protecting Registers in Context Switch [migrated]

I'm working on implementing a cryptographic algorithm. I'm using locked memory pages to keep sensitive data (such as keys and intermediate values) locked in RAM (having them never be written to ...
0
votes
1answer
427 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 ...
1
vote
0answers
45 views

process blocked in msgrcv

I have a process that is blocked in msgrcv as shown by ps -eo pid,tid,wchan. Is there any way to find the PID of the process that my process is expecting to receive a message from? The communication ...
0
votes
1answer
38 views

how to get list of all processes accessing a shared library [duplicate]

I know that ldd utility can list all libraries linked to a process but I want it the other way around. I want all processes linked to a library. I want to replace a shared library without crashing the ...
1
vote
2answers
1k views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
2
votes
1answer
956 views

How to get start time for a defunct process on AIX?

When I run the following commands on AIX: 22:root@SERVER:/root # ps -ef | head -1 UID PID PPID C STIME TTY TIME CMD 22:root@SERVER:/root # ps -ef | grep defunct | head -1 ...
4
votes
3answers
102 views

How to not show the stdout output of a running process?

When a running process gives lots of stdout output throughout its lengthy running process, you don't want to kill it and rerun it. How can you not show the output? Thanks.
3
votes
1answer
23 views

Minus and Plus Sign in jobs Process

These commands are running in the background: foo@contoso ~ $ sleep 30 & foo@contoso ~ $ sleep 60 & foo@contoso ~ $ sleep 90 & What is the minus and plus sign after running jobs process? ...
1
vote
4answers
5k views

monitoring file changes + process access to files

I would like to see what's happening in my app server folders, which files are changed by process x or which *.war files has been changed (replaced/created) in last x minutes. I am software developer ...
2
votes
1answer
34 views

What's the easiest way to detect what signals are being sent to a process?

I'm trying to debug an issue with my shell (specifically, fish) sending signals to my background processes. I'd like to be able to recognize what signals a process is receiving. Ideally, I'd like ...
0
votes
2answers
46 views

Why can't I kill the shell using the PID obtained from the $$ special variable? [duplicate]

After I have learned that the $$ special variable holds the process number of the shell, I tried too kill the shell by simply: kill , however this did not work, I also tried some variations, but them ...
0
votes
0answers
44 views

Send a remote job to a remote server (second machine) and end the first process

I Installed ScanBD for my scanner on a RaspberryPi. I also wrote a script to process the files once the scanning function has completed. SCANBD Script SCANBD Process Script Currently, the scans are ...