Questions tagged [process]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

What killed my process? No relevant entries seen via dmesg or journalctl on Rocky Linux 9.2 (Blue Onyx)

A program from a vendor gets killed instantly. I need to know why. Log shows nothing relevant. Any advice? I looked into OOM killer etc. Added tons of swap. Did not specify log in journalctl so I ...
Normand Robert's user avatar
1 vote
0 answers
34 views

mysqld thread count exceeds max_connections

As the question title suggests: I have set max_connections = 2 in my my.cnf file, but when I activate my mysql daemon, the thread count sits at 37. I am searching online but cannot find indication my ...
user10709800's user avatar
0 votes
1 answer
30 views

Run Additional Commands on a Specific PID

I'm completely new with Linux so forgive me if this seems like an absurd question. I am trying to open new tabs on Firefox without a url from the terminal. So my command is: $ firefox -new-tab -search ...
lems's user avatar
  • 3
1 vote
1 answer
68 views

Capturing output from a bash function without using a subshell [closed]

I have a bash script listening on a pipe for commands. When it sees a command it runs it. However, I would like it to support the "sideloading" of bash functions that can be called at a ...
nopcorn's user avatar
  • 9,559
0 votes
0 answers
19 views

User space swap

I have low physical memory 1GB in my VPS container based (LXC), therefore I can't change kernel parameter such as swap memory swappiness. Even though there is swap allocated from built-in VPS when I ...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
17 views

Prevent OOM killer inside guest in LXC

I have a python program myprogram.py. I realized that my python program is being killed due to Out Of Memory (OOM). But, I noticed also that my VPS is inside LXC and has swap 1GB, when the memory full ...
Muhammad Ikhwan Perwira's user avatar
2 votes
1 answer
88 views

How to pass a parameter to a command that's being executed by exec in bash?

I'm trying to start a subprocess with a unique process name from a bash script. This works: bash -c "exec -a MyUniqueProcessName './start_service' &" but my problem is that I want to ...
Adam Arold's user avatar
0 votes
0 answers
16 views

Identification of processes that are not terminated by logging out

I'm trying to better understand how to terminate all undesired processes and start a Linux session fresh. By "undesired", I mean any processes left over from applications that have crashed. ...
End Anti-Semitic Hate's user avatar
2 votes
1 answer
45 views

When SIGTERM is received by a process, what happens to its children?

I am wondering what happens when a process receives SIGTERM and it has children spawned (e.g. JVM that has /bin/sh commands running). Is there some sort of automatism or does the parent simply exit ...
RokL's user avatar
  • 143
0 votes
0 answers
35 views

Why does a program launched by echoing into sh persist after parent termination?

I was looking at dmenu_run, which is the default dmenu script to launch a program, and saw this part of it that intrigued me: [..other stuff..] | dmenu | sh & So I did some testing. Prerequisites ...
mutageneral's user avatar
0 votes
1 answer
55 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
11 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
61 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
105 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
20 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
92 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
23 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
141 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
63 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
145 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
  • 475
1 vote
2 answers
139 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
41 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
139 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
36 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
38 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
105 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
98 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
91 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
  • 429
0 votes
1 answer
92 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
49 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
1 vote
1 answer
1k 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
251 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
96 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
160 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
297 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
  • 5,552
-1 votes
1 answer
386 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
109 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
46 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
  • 333
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
100 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
188 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 ...
locnnil's user avatar
-2 votes
1 answer
350 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,901
0 votes
1 answer
181 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
143 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
882 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 ...
locnnil's user avatar
0 votes
1 answer
109 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

1
2 3 4 5
52