Questions tagged [process]

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

Filter by
Sorted by
Tagged with
-1 votes
0 answers
25 views

How do I find out whether my Linux system runs `systemd` as its standard process manager/launcher [duplicate]

How do I find out whether my Linux system runs systemd as its standard process manager/launcher or another one like sysvinit or upstart?
halloleo's user avatar
  • 565
0 votes
1 answer
45 views

How to detect if a process runs longer than X seconds, then do something with it?

I’m on debian. I am calling a ffmpeg process to generate a mp3. this gets called from a php script using shell_exec. This works fine 99% of the time. Sometimes, the ffmpeg process doesn’t exit and I’m ...
frumbert's user avatar
  • 115
0 votes
0 answers
10 views

Log PID and TCP Listen

I'm trying find, how can I log all process activites, for logging all TCP Listen syscalls. System is linux. My main problem, I need do some logging for passive FTP connections, but with time occurence,...
Znik's user avatar
  • 649
0 votes
0 answers
24 views

What is the process "pool_workqueue_release"?

What is pool_workqueue_release? It seems it's spawned right after kthreadd, ktrheadd is the main process/daemon to create kernel threads, right? In linux/kernel/workqueue.c I found: static void __init ...
Martin Stuwe's user avatar
0 votes
2 answers
95 views

What happens when I give the shell a "command" versus a script?

A variant of this question has been asked a few times (here and here, for instance) but I'm afraid that the answers either didn't fully capture my question here or else perhaps assumed more than I ...
EE18's user avatar
  • 233
0 votes
0 answers
15 views

List processes by cpu system time

I have a Node exporter up and running on my server, on my dashboard I see that my CPU time is mostly (+40%) spent in system mode which is not normal. How can I list processes sorting them by CPU ...
GlinesMome's user avatar
1 vote
1 answer
52 views

Count the total processes spawned using /proc/loadavg

In a Red Hat Linux 8 operating system, I examined the output of cat /proc/loadavg and obtained "5.20 5.78 8.04 16/1596 1954863". After 4 minutes, I rechecked the /proc/loadavg output and ...
GSK's user avatar
  • 11
1 vote
3 answers
89 views

is there a way to allow only a single proccess to delete a file?

Is there a way to allow only a single main process to delete an original file? Other processes may read and modify it, but not delete. I know a process can empty its contents but there is no problem ...
VeganEye's user avatar
0 votes
1 answer
21 views

When does a hup signal affect the parent process? [duplicate]

If I run ./script.sh &, where script is the following: #!/bin/bash echo "hello" sleep 30 echo "hello again" sleep 30 touch /root/foo.txt Then I use ps au, to identify the &...
Thomas Stokes's user avatar
1 vote
3 answers
121 views

start multiple terminal windows in a "process group" so that remaining processes can be killed, if any one of the processes terminates

I have a script which starts 3 terminal emulator windows: #!/bin/sh terminator --role='terminator-left' 2>/dev/null & sleep 0.1 terminator --role='terminator-center' 2>/dev/null & sleep ...
Martin Vegter's user avatar
0 votes
1 answer
52 views

How to get PID of last process run from bash script?

I am trying to get the process ID of the last executed command from within a bash script. Normally I would do: $ nohup ./test > nhout & nohup: redirecting stderr to stdout $ echo $! 3006196 #...
blackthorne18's user avatar
1 vote
1 answer
120 views

How do I configure auditd to print the ppid name, not just the ppid?

OS is Debian. I have set up auditd to try and determine what is rebooting a system. I have the following rule: -a exit,always -F arch=b64 -S execve -F path=/bin/systemctl -k debug_test Creating a ...
cat pants's user avatar
  • 585
1 vote
2 answers
87 views

System calls involved in stack and heap allocation

In the process address space, there is the stack and the heap. When a function is called, or even when a local variable is declared, it uses the stack; the kernel must assign physical address and ...
Dev Jain's user avatar
0 votes
1 answer
40 views

Is there a maximum number of group process ID?

The following post What is the maximum value of the Process ID? mentions how to get the maximum value for a process ID. Is the maximum value for a group process ID similar? Or is there another file to ...
GabrielGodefroy's user avatar
0 votes
1 answer
114 views

How to make command `id` print different real and effective UID in Ubuntu

The info page of command id states that it will output the effective user ID if different from the real user ID. I have been trying to achieve that somehow, running the command with the Bash shell as ...
gambarimas87's user avatar
0 votes
0 answers
29 views

why does ZSH pass # and arguments following to process? [duplicate]

I did some experimenting and: alex.mills@alex wss % node /Users/alex.mills/codes/vibeirl/wss/scripts/arg-test.js -v a # 3 [ '/Users/alex.mills/.nodenv/versions/14.17.0/bin/node', '/Users/alex....
Alexander Mills's user avatar
0 votes
0 answers
35 views

pgrep returns correct results only for partial script name [duplicate]

I have a script called synchronize_dirs.sh which just wraps a call to sleep: -bash-4.2$ cat synchronize_dirs.sh #!/bin/bash sleep 60 -bash-4.2$ What's confusing to me is the behavior of pgrep in the ...
Pacopenguin's user avatar
1 vote
1 answer
36 views

Discover the PID of a child process before it starts or after it finished

I wrote a shell script to start a program ${programName}. This program happens to creates temporary work files in a folder, <workFolderLocation>/SAS_work<randomHex>00<pidHex>_<...
Dirk Horsten's user avatar
0 votes
0 answers
51 views

How to run a process in the background using a bash script? [duplicate]

When I run the command in the terminal: sudo badvpn-tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:8080 I get a terminal with packet data ...
moninah's user avatar
  • 15
1 vote
1 answer
77 views

Process appears with square brackets ([]) around name after being SIGKILL'd

I am executing and killing a process as follows: python some_script.py &; pid=$!; sleep 5; kill -9 $!; ps -o pid,sid,uid,state,start,command In other words: I execute a script in the background, ...
Alessandro Power's user avatar
0 votes
0 answers
90 views

How to reown a process?

when i run this script with a shortcut(sxhkd): #!/bin/sh MUSIC_DIR="$HOME/music" songs=$(ls "$MUSIC_DIR") filename=$( echo -e "random\n$songs" | dmenu -l 30 -i -p &...
white-hat-er's user avatar
0 votes
0 answers
49 views

How to catch the memory leakage of a process in Linux?

I am working on an embedded Linux system (kernel-5.24.0), where is 128MB RAM in it. Now I found a process has memory leakage (from the free and available output of free -k), and I am trying to figure ...
wangt13's user avatar
  • 397
0 votes
1 answer
81 views

Is the information read in /proc/*pid*/stat updated by a timer interrupt?

As documented in https://www.kernel.org/doc/Documentation/cpu-load.txt the information in the pseudo file /proc/stat is updated by a timer interrupt, which means that /proc/stat may not give a ...
POtaoPereiraRosen's user avatar
0 votes
1 answer
44 views

why ulimit restriction is affect by other processes?

I have some processes creating large amount of threads (using python ray module), like 32 (proc) * 120 (thread per proc). Then I found other processes would fail on creating threads while their nTH is ...
beantowel's user avatar
0 votes
1 answer
544 views

trying to make my own shell handle ctrl+c properly

I am trying to understand how shells are set up so that the programs they are running receive the SIGINT when you press ctrl C but the shell doesn't, because when you are running bash, and run another ...
Alex028502's user avatar
0 votes
1 answer
172 views

Where does the signal that causes EINTR come from?

I Understand that EINTR is an error which so-called interruptible system calls may return. My question is where does the signal that causes EINTR come from? I faced this quite often when using fnctl ...
chewing gum's user avatar
0 votes
1 answer
81 views

How to list process with their depth?

I have a slightly different process tree question. I need to list the process and their depth in scalar value. pstree gives the result in a "graphic" manner. root 100930 0.0 0.3 ...
piovisqui's user avatar
  • 885
0 votes
0 answers
122 views

Process not stopping even after receiving Ctrl-Z

I was learning about signal handlers. I wrote a simple python script to handle and print all signal it gets. Then I ran that script on a remote machine through ssh. Then when I send Ctrl C signal, the ...
Sourav Kannantha B's user avatar
1 vote
1 answer
182 views

Why does Linux needs both pid_max and threads-max?

I understand the difference between /proc/sys/kernel/pid_max and /proc/sys/kernel/threads-max. There's a good explanation at the answer to Understanding the differences between pid_max, ulimit -u and ...
aviro's user avatar
  • 4,927
-1 votes
1 answer
284 views

How could we get the USS of a process

As far as I know there are several memory concepts: VSS RSS PSS and USS, in which USS(unique set size) is the physical memory exclusively used by a process(correct me if needed). I think this should ...
Qiu Yangfan's user avatar
1 vote
1 answer
82 views

get PID by name

I'm running an autopilot on a closed environment running Linux, and I've got a kernel thread whose priority I need to change. I'd prefer not to patch the kernel for this. This thread is created early ...
rsaxvc's user avatar
  • 150
0 votes
0 answers
44 views

Same binary & different permissions, How can it be?

I was doing a pwn ctf and found a weird situation. The ctf includes binary file and a server. There is a given elf 64 bit. checksec output (same local & server). Arch: amd64-64-little RELRO: ...
Ori's user avatar
  • 1
0 votes
1 answer
41 views

Why the process still can be listed after killing them?

List all process running vlc: debian@debian:~$ ps aux |grep vl[c] debian 14482 0.1 2.2 2882968 136428 ? Sl 10:19 0:02 vlc -I telnet --telnet-host 192.168.31.167 --telnet-port 4212 --...
showkey's user avatar
  • 275
0 votes
0 answers
28 views

how to put an existing process into an interactive shell's foreground [duplicate]

Say I started a long running process with nohup. As predicted, I close the current shell session. I open a new one and then I would like to add the still running process to the foreground (or to the ...
Sebastian Carlos's user avatar
0 votes
1 answer
90 views

What's the difference between "-dm" and "-Dm" in GNU Screen?

The GNU Screen manual says: `-d -m' Start `screen' in _detached mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts. ...
Sebastian Carlos's user avatar
0 votes
0 answers
173 views

Periodically print analysis for a long-running C++ program to detect memory leaks?

I have a C++ compiled program (an ELF binary) intended to run forever, similar to an HTTP server. I would like to use Valgrind to analyze the program for any memory leaks. However, Valgrind typically ...
Lincoln's user avatar
-2 votes
1 answer
296 views

How to find one of multiple processes with the same name using pgrep (or another tool)? [closed]

I have several bash scripts running. The only thing that differs between them is the pid. I want to write a script like this that only monitors one specific bash process and exclude any daughter ...
d-b's user avatar
  • 1,891
0 votes
1 answer
122 views

Running a function as process with a set process name or id

I have a bash script set up to monitor a number of UDP streams and convert it into actionable data. My problem is that I need to set the script to periodically check to see if the stream capture is ...
Dan D's user avatar
  • 3
0 votes
2 answers
118 views

How to find PID of all processes related to a given process?

How can I go about finding the PID or other information about a process that is doing the work of another process? I'm talking about kworker threads, for example, or any other threads/processes that ...
stochasticlover1's user avatar
0 votes
2 answers
685 views

How to write a process that restart again every time that it's killed

I want the exact opposite of this question. I want to know how I can create a process that keeps restarting if it's killed. Could someone give me an implementation example? For instance, let's assume ...
Lincoln's user avatar
0 votes
1 answer
93 views

How to find the parent network device for a PPPoE device

For a POINTOPOINT PPPoE ppp0 device in Linux, how to get the underlying ethernet device in a reliable way? I've looked in the output of ip -d link and in the /sys/class/net/ppp0 directory, but neither ...
Alex Stragies's user avatar
0 votes
0 answers
16 views

Child process flamegraphs

Are there any tools that will give me a flamegraph of child process execution. For example if I run make I would see all of the gcc invokations in a nice tree with their start and end times. The ...
Timmmm's user avatar
  • 576
2 votes
1 answer
99 views

Is there a command to make another command or process complete faster?

Background I was using sudo renice -20 -p <pid> thinking it would make my videos convert faster. On testing the time it had no effect and then I found out that speed has nothing to do with ...
Nickotine's user avatar
  • 469
1 vote
0 answers
28 views

Why does subcommand take the PID of parent when I don't use exec [duplicate]

I executed bash -c "ps && ps" and got the following output: PID TTY TIME CMD 25544 pts/0 00:00:00 bash 26562 pts/0 00:00:00 bash 26563 pts/0 00:00:00 ps PID TTY ...
user1335014's user avatar
0 votes
2 answers
608 views

check is Process is Alive from PID while handling recycled PID

From what I seen online you call kill method in c++ in order to see if the process is alive. the issue with that is PID's get rycled and the same PID your looking for may not be the same process. I ...
joseph lake's user avatar
0 votes
3 answers
217 views

retrieve std out redirect to /dev/null

is there a way to retrieve std out redirected to /dev/null? I tried tail -f /proc/{PID}/fd/1, looks like only works except redirects to /dev/null. i.e. tail -f /proc/${cmd_pid}/fd/1 works on cmd > ...
furynerd's user avatar
1 vote
0 answers
41 views

What is the process named SEPDRV_ABNORMAL under Linux?

Today, I ran ps -ef and I noticed that one of my Ubuntu 18.04 processes was named SEPDRV_ABNORMAL. Any idea what that process would be? root 5796 2 0 11:11 ? 00:00:00 [SEPDRV_ABNORMAL]...
Alexis Wilke's user avatar
  • 2,807
-2 votes
1 answer
201 views

killed a process, it comes back

I have some process running >ps | grep camera 2345 root 3.08 someprocess camera.json I am trying to kill it but neither kill 2345 kill -9 2345 work. The process comes back to life under a ...
KansaiRobot's user avatar
4 votes
2 answers
381 views

Open File Explorer on a File that is open by another Application

I use the following script (it is bound to a keyboard shortcut) to open selected file (clicking on a window after using the shortcut) in nemo. What is does is from window id (after clicking on the ...
Ahmad Ismail's user avatar
  • 2,648
0 votes
2 answers
146 views

Get CPU core id executing a process which suddenly exits

In Linux, in a multi-core processor, ps, top and similar tools can show the CPU logical core id running a specific process. If the process runs for a certain amount of time, it's easy to identify it ...
BowPark's user avatar
  • 4,895

1
2 3 4 5
52