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

learn more… | top users | synonyms (1)

7
votes
2answers
370 views

Is there a way for shell script to know which program has executed it?

In *nix world, is there a way for shell script to have information about which program has executed it? Example: /path/to/script1 /path/to/script_xyz in this imaginary scenario, script_xyz would ...
3
votes
0answers
34 views

How to determine how much time a process is blocked waiting for networking (socket) activity?

We are having issues with high load (top and uptime) but high CPU idle. Usually, that means high IO wait but that's also low. I believe IO wait typically does not include time a process is blocked ...
-1
votes
0answers
17 views

posix_spawn taking too much time to spawn a new python program from c++ [on hold]

I'm facing a problem where when I invoke my python program from c++ using posix_spawn it takes around 70ms-200ms based on how long main program was running. Is there anyway I can reduce this time, as ...
1
vote
1answer
36 views

Avoid running multiple programs [on hold]

Some programs, eg. firefox, allows to have multiple instances. Though, this is useful in some cases (eg. new xterm instance), I usually end up having enormous number. Is it possible to configure ...
0
votes
0answers
23 views

Not owner error in AIX(unix) while getting pgid between processes

I confront a problem while porting my python program in AIX. The problem seems on ownership or permission between processes. Let's assume that there are two processes(process1, process2). The ...
0
votes
3answers
30 views

how can I supply negative value to nice() and run without error even if I am not the superuser

how can I supply negative value to nice() and run without error even if I am not the superuser can I do system("su"); nice(-1); it is asking for password which I do not want?
0
votes
0answers
8 views

Process Family Tree: list_for_each() [migrated]

I'm reading about Process Management in Robert Love's Linux Kernel Development. He's writing about how one can use the following code to iterate over a process's children struct task_struct *...
0
votes
0answers
13 views

Logging all processes which initiated and quitted [duplicate]

When a program is initiating, it will appear when running the command sudo ps aux. After that a program has quitted, it will NOT appear when running the command sudo ps aux. How do I log/record all ...
0
votes
1answer
28 views

Order of signals: SIGPOLL and SIGCHLD

I spawn a child process and connect to it with a pipe. I configure the pipe to send SIGPOLL on data available by fcntl I_SETSIG. The child sends some data over the pipe and then terminates. Can I ...
1
vote
1answer
16 views

Check which display an application is using

The machine I'm working from has many active X displays (one standard X server and many VNC displays). It is also running a handful of GUI applications, which appear on an X display. Assuming I have ...
2
votes
2answers
234 views

Dropping a process into the background

If I have started a process, and it spends more time than I anticipated, and I regret not having said rm foo & rather than rm foo, can I do something to drop it into the background?
0
votes
2answers
35 views

How to show processes that use more than 30% CPU?

I need to display processes that use more than 30% CPU via command top. How can I do it?
0
votes
3answers
193 views

Check for process and kill if running

I am trying to find if a process is running or not, and if it is runing then I want to call a script or print something. I tried with the below few ways, but it gives me syntax error or command not ...
1
vote
1answer
30 views

How can I find duplicate processes on FreeBSD?

I suspect that there is some replicate (many instances) process that is overloading the CPU of my FreeBSD 10.3 (pfSense v2.3) computer, but I don't know what its name could be. The process is ...
13
votes
2answers
455 views

How should I check whether a given PID is running?

I'm writing a Perl script that parses logfiles to collect PIDs and then checks whether that PID is running. I am trying to think of the best way to make that check. Obviously, I could do something ...
3
votes
2answers
101 views

How can I start several processes with a single command?

I use pianobar player. But before launching it I need to run tor and polipo. Both are continuous (are running until interrupted). Basically what I'm looking for is a single command which would spawn ...
0
votes
0answers
20 views

Log notifications sent by process and its descendant

I have a process which creates a lot of processes, I know that processes can send notifications using /run/systemd/notify (systemd-notify). Is there any way that I can launch processes and log all the ...
0
votes
1answer
34 views

Why are processes stuck in system calls (sometimes) unkillable? [duplicate]

I recently had a problem with a c program I wrote. According to ps it was stuck in a system call, even kill -9 didn't change anything about it. Even a restart didn't work, it was stuck forever in ...
2
votes
0answers
27 views

How to renice all threads and child processes on Linux?

Linux does not follow the POSIX.1 standard which says that a renice on a process affects "all system scope threads in the process", because according to the pthreads(7) doc "threads do not share a ...
2
votes
1answer
46 views

Understanding controlling terminal

I started a java program that simply enters an infinite loop from a unix terminal (let's say terminal window tw1) I opened up a second terminal window (say tw2) and executed ps -ef | grep java command ...
0
votes
1answer
13 views

What is the threshold for top to label a process as idle

With the top command I can toggle, whether to list idle processes or not. What is the CPU usage limit for a process to show up as idle or non-idle?
2
votes
1answer
34 views

How to set per process disk quota?

I want to set disk quota (limit maximum space used in the file system) that a particular process can use under Linux. There seems to be plenty ways to limit disk quota for a user, but not at a per ...
0
votes
0answers
20 views

Sub process keyboard input layer

I have a bash script where I set up a stream playlist by user interaction. The user then press p to play the selection. This simply do something like: media-player --playlist media-player defaults ...
0
votes
2answers
39 views

Why is ulimit -u higher than /proc/sys/kernel/pid_max?

On my system ulimit -u reports 63172 and /proc/sys/kernel/pid_max reports 32768. Why is it that the value for ulimit -u is higher than the kernel's value? From my understanding, ulimit -u shows the ...
6
votes
1answer
93 views

What does '?' represent under TTY

If you run ps in your terminal, you may see something like the following: What is ?? I'm ssh'ing into a Linux server, so I assume that it's just the sshd as it says under CMD, but I'm curious what ...
1
vote
2answers
31 views

VIM: function that checks if external program is running

Using a vim function, I would like to check if a program is running using pgrep, and if it is not running then do something. In particular, I want to achieve something like this: function! ...
1
vote
1answer
34 views

pkill not killing processes past immediate descendants of a process

I want to kill a chain of process e.g. PID PPID 100 XXX 101 100 102 101 When I use pkill -P 100 PID 100 and 101 die as expected, but 102 is given init as it's PPID. How can I force pkill to ...
0
votes
1answer
13 views

UFW app based filtering

is there any filtering in ufw which works sort-of like win firewall? basically allowing me not only to create ip/port/proto based rules, but also to bind such limitations to specific executables ...
1
vote
0answers
33 views

Theoric: How to kill a forever forking process?

Let's say you have a process that forks every time it has the chance. It launches itself in niceness -20, so it forks faster than you can kill it. Also, it remembers its childrens and it parents, so ...
0
votes
0answers
20 views

hadoop as init.d Process - status_of_proc return process not found

I was trying to use the init.d script to control hadoop service. The start and stop commands work without any issue. However status_of_proc does not find the process and its returning service is not ...
0
votes
1answer
26 views

What could be the cause for going to uniterruptable deep sleep state for this particular make process?

I am trying to understand 'D' state correctly. In my case, the following process went to 'D' state: make -f freac/CMakeFiles/freac_objs.dir/build.make freac/CMakeFiles/freac_objs.dir/build It is ...
2
votes
1answer
407 views

Does pkill kill itself (and its parent processes) last?

I'm writing a bash script that kills a bunch of processes selected by certain criteria and then quits. The only problem is that those criteria apply to the script and its parent processes (bash, sshd) ...
3
votes
1answer
50 views

filter out certain processes and/or pids in ftrace?

I'm not sure if I'm thinking about this the right way (and please correct me if I'm wrong), but the following is my understanding of ftrace. In /sys/kernel/debug/tracing, there are the following ...
2
votes
1answer
34 views

Why is tee process still running?

# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 13880 4016 ? Ss 20:40 0:00 /bin/bash root 9646 0.0 0.0 4312 360 ? ...
1
vote
2answers
35 views

How to use top in a shell script to track memory consumption of a process?

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using runtime.totalMemory - runtime.freeMemory But that'...
0
votes
0answers
18 views

Find the process creating junk in my home folder [duplicate]

Some process keeps creating a folder called \~ in my home folder every time my computer boots up (and some other times, too) and it's really getting on my nerves. I guess this misconfigured app knows ...
0
votes
0answers
11 views

TCP/UDP socket in order to put on hold processes

I'm working on some bash scripts which will solve "The dining philosophers problem", in order to do so I created two scripts, run.sh and philosopher.sh . In run.sh I run n instances of philosopher.sh ...
0
votes
1answer
37 views

can't find running process which I started via SSH yesterday

Yesterday I connected to my Developer VM Debian Linux via SSH. I started "Mamute" which is a open source stackoverflow clone etc. As I restarted my machine today I reconnected as root and wanted to ...
3
votes
1answer
73 views

How to tell whether a process is network I/O intensive or not in user mode in Linux?

I am currently writing a program in Linux which needs to tell whether a specific process is network I/O intensive or not at runtime. I have tried some tools such as iotop and iftop, but none of them ...
0
votes
0answers
24 views

How to find the subroutine associated with a particular daemon process

I have a daemon process running on my shell and I know its process ID and the location where it is running etc which i obtained by ps -ef command. I want to get the script of that particular process ...
1
vote
0answers
50 views

What happens if dbus connection fails?

I am trying to find a root cause for server hung. I found that a process crashed with process id 14900 and the following are the log in message. No core dump is saved as it is not related to any ...
1
vote
1answer
38 views

Disable OS-level caching

I want to be able to prevent the OS from caching in memory either: A particular file, or Any file a particular process accesses (i.e. by specifying a pid) Either would be helpful since I don't ...
1
vote
2answers
110 views

How to make sure that a child process of a supervisor job dies when I kill supervisor

My app is a jar file that requires some environment variables. I have all the environment variables in one file, which looks like this: export VAR=value export VAR2=value2 #....etc My supervisor ...
2
votes
0answers
50 views

Read another processes memory using ptrace() in C/CPP [RaspberryPi]

So, initially, process A created a file containing data (37 Bytes) read from a stream(UART). Process B has to acquire that data, which is stored in /dev/shm. Process A has an absolute maximum of 4ms ...
1
vote
0answers
18 views

WCHAN = 0 for a sleeping task?

I am a little confused about the status of a process I have. It looks like this: $ ps -eal | head -n 1 ; ps -eal | grep perf F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 4 S ...
7
votes
4answers
132 views

How do I determine if a program is running when I start a shell and start that program if it is not already running?

When I start a shell, in my case bash and/or zsh, what lines do I need to add to .zshrc and/or .bashrc to check to see if a program is already running, and if the program is not already running, start ...
1
vote
1answer
42 views

Point and click Ubuntu 16.04 bash script randomly alternates output behavior

I wrote and tested the following point and click Ubuntu 16.04 bash script for the purpose of completely killing a mono-service RecorderManager.exe process by literally killing the process id returned ...
1
vote
1answer
39 views

FTDI Driver for Custom PID and VID

I have changed VID and PID of my ftdi board to 0001 and 0002. Now the com is not showing and the device is showing in unknown device. How can make a customize driver for it to get com port. Sorry ...
1
vote
0answers
30 views

Reopen xchat after it has been closed to the system tray

When I close xchat to the system tray, it is leaving IRC connections to servers and consequent channels open and the process running. However, when the program is reopened from the system tray, it ...
4
votes
1answer
48 views

how to reliably determine processes using files after `umount -l` on linux

The Question After umount -l was performed on some mounted filesystem, and this filesystem remains still mounted (albeit hidden) because of some process maintaining (at least) one open file handle to ...