All Questions
2,681 questions
-4
votes
2
answers
201
views
Linux kill command returns "No such process"
In the below shell script I have list of process IDs which need to be killed. When killing a process I am getting kill: 1234567: no such process error even after checking if the process id existence ...
0
votes
1
answer
110
views
Getting PID from PHP shell_exec to kill server process later
I'm running a server on Linux, and I need the specific PID so I can kill it later. I'm using PHP with shell_exec to run the server, but how do I get the specific PID of this server?
while($...
0
votes
2
answers
114
views
Killing a process PID starts a new process instead
I have a running process on localhost on port 5000. I have tried kill - 9 <PID> which it works for that PID but it starts a new process with a new PID instead. What's the issue here?
I'll put ...
1
vote
0
answers
30
views
Process Maps in s390x linux systems
So I am working on a debugger for linux s390x system and have the whole disassembler etc set up for reading the ELF file. For debugger I just run it on the process with base address from the process ...
0
votes
1
answer
126
views
In one process, any way to know whether there exists any other same program is running? [duplicate]
So I am designing a feature to redirect log file if there are multiple processes of this very program are running.
I guess this requires me to somehow get to know whether there exists yet unfinished ...
4
votes
0
answers
104
views
Recovering text of Unsaved document from process memory? (frozen Xed window - process still "running" but in Sleeping status)
The window of my text editor Xed froze with Unsaved documents just as I was doing 'File'->'Save as...' to save them... [How ironic.]
Since the process still exists, I am trying to recover the text ...
0
votes
1
answer
75
views
Is there any advantage to changing process priorities using a kernel module instead of nice / chrt?
I'm working on a project where I want to study the impact of process priority on system behavior.
I know that tools like nice, renice, and chrt can change the priority or scheduling policy (e.g., ...
0
votes
2
answers
117
views
how do I prevent script continuation when the process run queue is full?
Environment: shell is BusyBox bash 3.2 running in what started-out as Ubuntu Server many years ago, but has since been tweaked a great deal by the manufacturer of this particular box to become a ...
7
votes
2
answers
407
views
How can I find location of PRI in /proc
I have sshd with PID of 1957:
mohsen@debian:~$ ps ax -o pid,nice,pri,cmd |grep 1957
1957 -2 21 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
According to above, my nice number is -2 ...
2
votes
1
answer
160
views
Mapping two users to host with user namespaces
I'm trying to understand whether it's possible to map two users from a user namespace to two different users on the host.
The goal is to replicate the same permissions I have on my host inside a ...
0
votes
0
answers
60
views
Why does there appear to be a discrepancy when trying to programmatically access files associated with different tasks in Linux from kernel space?
As a way to better understand Linux kernel structures, interacting with and pulling information from these (and also getting more experience coding in C), I've been building simple kernel modules to ...
0
votes
1
answer
90
views
Can you use `inotify` with `/sys/fs/cgroup/pids.peak`?
I am trying to implement a program that would run as PID1 in a Podman container and would wait for the the user to podman exec into the container at least once before exiting. /sys/fs/cgroup/pids.peak ...
2
votes
1
answer
923
views
What do programs use to read their environment?
I'm on Fedora, where all preinstalled shells apparently support bashisms: bash --posix does, and even sh. Still, when I used this function,
pathprepend () {
if [[ ":$PATH:" != *":$1:...
0
votes
1
answer
68
views
How long has a process been idle since it last ran?
I am interested in finding out the last time a process was scheduled to run. That is, how long it has been sleeping, since it last ran. When was it last active? Basically, a generalization of what the ...
1
vote
1
answer
68
views
Why read process doesn't show up in ps -ef
I open two terminal windows. In one, I run:
$ read foo
I don't press RETURN, so read is blocking. In the other terminal window, I search for the process:
$ ps -ef | grep foo
user 95292 94814 ...