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

learn more… | top users | synonyms (1)

3
votes
1answer
10 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, ...
5
votes
2answers
192 views

ls -l /proc/self | increamental PID?

Each time, when the commandls -l /proc/self is executed, the link points to process who's PID keeps increasing. Why is this so ? Is it the PID of the ls command ?
0
votes
0answers
15 views

Serial port locked by random process

I have an issue with trying to open a USB device's serial port with pyserial. It seems that as fast as I connect the device, /dev/ttyACM0 is used by some random process. ModemMana 851 root 8u ...
1
vote
2answers
41 views

start process (as root) upon user login

I would like to start a process as root upon each user login. The motivation beside this is, that the process will work on encrypted home folder of particular user folder. How can I achieve this?
1
vote
1answer
40 views

How to do a netstat that will only filter based on pid

How can I have the following command below just show/filter based on the PID's I'm looking for? sudo netstat -lp --inet The results come back as this Proto Recv-Q Send-Q Local Address ...
0
votes
2answers
28 views

How do Linux PIDS increment

Why do PIDS under Linux (generally) increment by 4? The only exception I can think of is startup processes run by systemd, which increment by 1 when they are related or 2 otherwise. How was the ...
2
votes
0answers
45 views

“Restart” a process in the same terminal?

I put "restart" in quotes because the following question on SO illustrates what I'm trying to do: http://stackoverflow.com/questions/27957091/restarting-a-process-in-the-same-linux-terminal I'm ...
0
votes
2answers
36 views

do processes access cpu and memory by system calls to the kernel?

If I am correct, processes access devices by system calls to the kernel. CPU and memory are also devices. when a process starts to run, does it get cpu and memory by system calls to the kernel? ...
1
vote
1answer
29 views

Count the total number of sub-processes (recursively) spawned by a command

How do find the total number of child processes (recursively) spawned by a script? For profiling purposes, it is sometimes important to count the generated sub-processes of command, script, etc. ...
-1
votes
0answers
17 views

Using aircrack-ng for Fedora 20

I installed aircrack-ng from my repository. Is it strictly command line only? How do I start/enable aircrack? What are some basic commands a/o syntax?
1
vote
0answers
41 views

Monitor the creation of new processes

I want to get a notification whenever a new process is created. I've tried to use inotify on /proc, but it didn't report any event even though a new directory appeared in /proc. I could list the ...
1
vote
1answer
97 views

Why cannot we kill a zombie? [duplicate]

I am editing this question since it was marked duplicate as another question about how to kill a zombie process. I am not looking for an answer to how to kill a zombie process. I do not have zombies ...
2
votes
0answers
32 views

What uses Linux “application memory”?

Just for fun, I wanted to watch what ls -lR / does to my "buffers" memory on a Linux system. As expected, the value increased. But I noticed that the "application memory" (i.e. "used" - (buffers + ...
5
votes
0answers
57 views

Why file-nr and lsof count on open files differs?

I am running into a problem all of a sudden; all my applications and the server was running fine and all of a sudden I see the number of open files shoot up. I am checking it with this command: cat ...
4
votes
6answers
641 views

grep invading my ps [duplicate]

When I'm checking for some process, I usually write ps aux | grep myprocess And sometimes I get the output of eimantas 11998 0.0 0.0 8816 740 pts/0 S+ 07:45 0:00 grep myprocess if ...
2
votes
1answer
29 views

“incrond dead but subsys locked” what does it mean?

While running "service incrond status" it shows "incrond dead but subsys locked". Can you please tell me what does it means. Normally its status should be running. Let me know what may cause it to ...
1
vote
1answer
31 views

fork() and how signals are delivered to processes

I program that I wrote in C fork()'s off a child process. Neither process will terminate. If I launch the program from the command line and press control-c which process(es) will receive the interrupt ...
2
votes
0answers
29 views

Determine the owner of the session of a process

I am trying to implement a way to determine which user is owner of some process's session, in a way that's as cross-platform as possible. In Linux I can trace the process's pty by following the link ...
2
votes
1answer
45 views

Bash update list of running jobs with ps

I need to run in parallel a set of computationally intensive tasks. What I was trying to do is to maintain a list of pids corresponding to the running jobs and update the list of running jobs with ps ...
1
vote
1answer
41 views

Equivalent command for ``time`` for memory usage?

by using time we can easily get the information about how long a program run, I was wondering if there is any equivalent command I can use for memory usages? Like how many memory are allocated for ...
2
votes
5answers
556 views

How to kill stubborn process

I've an annoying process that won't die: ps -A | grep "nzbget" gives me: 11394 pts/3 00:00:00 nzbget If I try: pkill nzbget (or 11394) ...I get no response and the process is still alive, ...
-3
votes
2answers
51 views

A process is a program that is loaded into RAM [closed]

Is this correct? Basically, programs are simply code on hard disk and they are called process(es) when they are in the RAM, right?
1
vote
2answers
49 views

Can Process id and session id of a daemon differ?

As far as I understood from different articles and here , a daemon has the following features: Parent Process ID should be 1. No terminal should be associated with the process. The process id, ...
0
votes
1answer
39 views

'htop' process and threads cpu usage?

I'm observing a multi threaded process in htop in tree view. If I were to strip it just to the problematic part, it looks somewhat like this: CPU% bin/process 100 `- ...
1
vote
1answer
39 views

Process id of a command ran by an user

Consider i am running just some basic command.. ls Now would the above command have a pid, when it was getting executed? If yes, then how can i determine that pid? when i try echo $! right ...
1
vote
0answers
46 views

pkill -P $ID working while kill — -$ID not

I was playing around with creating and killing process groups on linux ( ubuntu ) I am trying to kill a process group and am being driven crazy by the fact that pkill -P $ID works while kill -- -$ID ...
3
votes
1answer
36 views

Retrieve X11 window ID of a just-launched GUI-program

I want to retrieve the X id of GUI programs I launch in background, in order to work on their windows properties. I've been so far using this workaround: myprogram & sleep 1 winID=$(wmctrl -l | ...
4
votes
3answers
352 views

How can I start a process with any name which does nothing?

I want to start a process that does nothing but is still running. Say I start a process called sadhadxk, and when I run pgrep -x "sadhadxk" I will get the PID number back, like any normal process ...
3
votes
2answers
90 views

Sorting the output of `ps`

I am trying to understand why ps does not behave the way I expect it to. From the man pages, the following command should display ppid and lstart, with items sorted by lstart order. However when I run ...
2
votes
2answers
100 views

gracefully terminating processes with killall <processname>

I am using several instances (profiles) of Icedove (Thunderbird) and when I need to close all of them, I use: killall icedove According to man killall, if no signal name is specified, SIGTERM is ...
2
votes
1answer
60 views

Find out to which directory a process is writing?

This question is NOT a duplicate of this question Find out current working directory of a running process?, because the writing directory can be different from the working directory. For example, I ...
1
vote
1answer
22 views

PID in top different from the $$ one?

I have been always running my following job. #!/bin/sh NO_START=1 STEP_SIZE=1 NO_END=100 DATE_STR=$(date +%m%d_%H%M%S) RUN_DIR=./$DATE_STR mkdir $RUN_DIR echo PID = $$. See $RUN_DIR/$$.log for ...
1
vote
2answers
27 views

using sudo create another process

I have wrote a shell script names testShell.I run this shell using command: sudo sh testShell Then I use ps -ef|grep testShell|grep -v grep to check the processes created.I find that system ...
0
votes
1answer
65 views

Pipe stdout to command on stdout

If I had a running process like tail -F watch.txt and I wanted to capture the stdout from this running process and pipe it to another command on stdout how could this be done? Here's an example of a ...
1
vote
0answers
35 views

What does the “k” metric mean in the “sa” output?

From man sa: k cpu-time averaged core usage, in 1k units My questions: How is it calculated? What is the significance?
1
vote
1answer
86 views

What is JID (job ID) and is it always smaller than PID? [closed]

I don't know what exactly is JID (job ID) and how it is assigned. What is it's relation to PID and how does one number affect the size of the other in any way?
0
votes
1answer
37 views

command “jobs” cannot see the stopped jobs

I have wrote a very simple shell script to practice command "bg" , "fg" and "jobs": #!/bin/bash myvar=1 while [ $myvar -le 100000000 ] do echo $myvar myvar=$(( $myvar + 1 )) done I use ...
2
votes
1answer
38 views

How to suspend a process for a certain period of time?

I have several running processes which is started by a shell, but I don't want them to run during 08:00am - 20:00pm for each day because they are really bandwidth-consuming, so , I have to suspend ...
0
votes
1answer
19 views

screen manager with VT100/ANSI terminal emulation

If I join with 'screen' to existing sessions, I can get a list of the sessions with C-a " keystroke and switch between them, however I can't find a way to safely leave/detach and keep all the ...
2
votes
1answer
14 views

list processes running inside of screen (manager with with VT100/ANSI terminal emulation)

I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list ...
0
votes
1answer
15 views

Mechanism of multiple call for one script in the same time

Maybe this question is stupid Anyway I have the ruby script which is calling from different places in the same time(with defferent options). Is it safely and how this mechanism realized in linux? I ...
0
votes
1answer
22 views

CPU time that accton (psacct) records - recorded time relationship between parent and children processes

I've had 'accton' (in package psacct-6.3.2-63.el6_3.3.x86_64) turned on as I want to be able to report on a particular process (so I've written a script that will take the psacct file and get the ...
0
votes
1answer
33 views

Why PPID is different when opening from terminal and when opening by doubleclicking

I am using Linux. When i opened gedit program in gnome-terminal by gedit command it has opened the graphical gedit text editor. then the gedit has PPID bash ...
0
votes
2answers
44 views

Creating background process and communicating with it

1st thing off, I am really a Linux newbie - knowing just some basics; there's a great chance I didn't know what I need to look for, please redirect me if you know a good source. What I'm trying to do ...
0
votes
0answers
24 views

Why are some processes “killable” by pkill but not killall?

I had over 20 instances of httpd (apache) processes running, so I decided to shutdown these. Normally I use killall, But when I typed killall httpd it just said: No matching processes belonging to ...
0
votes
1answer
61 views

How to move a background job from one terminal tab to another? [duplicate]

I have a background job, say jobid 1, in a tab of gnome terminal. Can I move it to a another tab of genome terminal? I understand that the shell process in the first gnome terminal tab is the parent ...
0
votes
1answer
47 views

grep for specific process in ps but not the grep command itself [duplicate]

If I want to check if something is running, I do ps aux | grep flamethrower, expecting just to show the processes containing flamethrower in the name. This will always find at least one process, as ...
0
votes
1answer
44 views

Why kernel threads are treated as processes

In output of the ps command like the one below (kthreadd,ksoftirqd,kworker) , i can see that there are some processes that don't have an executable file and i find out that's because they are kernel ...
0
votes
0answers
132 views

System CPU Time and User CPU Time Calculation for a Process in Linux

I want to calculate CPU time consumption of a particular process in system mode and user mode using statistics present in /proc/<PID>. There are two fields utime and stime in ...
0
votes
3answers
86 views

Find the parent of a process

I am trying to write a script to help with computer security. I am trying to look for open ports, find the PID, and find what called it. I have it working, where my output looks something like this: ...