Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [process]

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

0
votes
0answers
14 views

Netstat operation

I would like to have a deep sight about how netstat works ina low level. I mean, if I use netstat to see open ports, how netstat checks them (checking running processes or with some system functions ...
0
votes
0answers
27 views

how to control process that killed

we want to know what are the options to control processes , for example /opt/important_script/gate_machine.pl is a script that must be up and running and in case from some reason script killed , ...
0
votes
1answer
16 views

Bash multiple commands via `-c` parameter weird signal behavior?

bash -c "sleep 5; echo 'test'" If I run the above, and press CTRL-C while in the sleep 5, it terminates the entire process and echo 'test' does NOT get shown. How can I have the above run and allow ...
0
votes
0answers
11 views

Does tmux kill-server shut down running applications gracefully?

Using the tmux command kill-server one can immediately shut down the tmux server and close all open tmux windows. How does this affect the processes still running inside the various tmux windows? Will ...
1
vote
0answers
42 views

High CPU load average; how to find the root cause?

It is hard task to find the root cause of CPU load average many commands are used to give partial picture. I am not sure if somewhere we can find a tool that knows how many CPU's we have on machine ...
-1
votes
0answers
20 views

single thread process completes faster in server with less resource than the server with higher resource [closed]

I've weird situation, i have 2 server one with 2 vcpu and 4gb ram and another with 4 vcpu and 8gb ram. Im running an single threaded application on these servers and i noticed that the 2vcpu server ...
0
votes
1answer
51 views

Where does main function get allocated?

When concerned with a memory layout for a process, all function calls within the process get a new stack-frame into the stack. I'm not sure if this is true for main function as it seems like main ...
0
votes
0answers
52 views

How to read all background processes from /proc directory? [migrated]

I want to get a list of all background processes running in the OS. job command does the work. But I am using C to do the task. The main problem is, how to distinguish background processes from the ...
10
votes
2answers
1k views

Bash script should only kill those instances of another script's that it has launched

In the current situation, a certain script 'calling.sh' launches another script 'called.sh' in the background, performs other operations, sleeps for a while, and then terminates 'called.sh' with a ...
0
votes
0answers
29 views

systemd: process with fork() only shows logs after child exits

I have a program that fork()s and exits. Its child remains running for about 50 seconds, while it prints out messages each 5 seconds. When I run from a terminal it runs as expected, the parent exits, ...
2
votes
1answer
34 views

Red Hat Linux - port is in listening state but could not find process ID

I have this problem for my application, port is in listening state but process ID is not showing up. Used below commands. This is cloud AWS server Red Hat Linux. $ netstat -tulpn tcp 0 ...
0
votes
0answers
15 views

Are there notification calls when a Process exits?

I was thinking about making a tool that triggers some kind of callback once a Process exits, particularly in the case where it's daemon/long-running process. The idea is to listen for that event, ...
0
votes
0answers
23 views

Understading Linux Process Priority (PR)

I have been trying to understand the linux nice and priority system, from my uderstanding a processes NI or nice level is esentially how freindly it is to other processes in terms of fair use of ...
0
votes
2answers
58 views

How to limit a process' memory usage while it is running?

On my server, I have a long running batch process, process_a, which have been running for several days now. I don't mind the duration of which the process needs. The problem is how process_a always ...
2
votes
0answers
66 views

Legitimate reasons for a program to intercept, internally handle and ignore SIGINT signal

We know that - aside from SIGKILL and SIGSTOP - a program can intercept IPC signals, and run its internal handler circumventing the operation of the default handler. I can think of at least one very ...
0
votes
0answers
24 views

Background processes in bash preserving order

From a GUI terminal emulator running bash, I would like to open a tabbed instance, get its X window ID, and use it to embed four st terminal instances inside tabbed, with titles from 1 to 4, in ...
0
votes
0answers
55 views

failed to execute child process xterm (no such file or directory)

When I right click on a file and select vim from upcoming tabs I get this error. Some files of vim should missing. In addition I'm able run vim from bash but can't run from desktop. Debian 9.8 ...
0
votes
0answers
7 views

How increate KsysGuard exit process grayed out timeout?

When a process exits, ksysguard make it gray for just a second before removing it from the process list. I would like for it to keep showing for the next 10 minutes, so I can easily see old processes ...
1
vote
1answer
27 views

get CWD where process was started [duplicate]

I have a program called /usr/bin/myprogram.x In one shell window I did something like cd /run001/ myprogram.x & cd /run/009/ my program.x & cd /run/234/ myprogram.x & I kicked off a ...
0
votes
0answers
21 views

Which one to use Cross Memory Attach or ptrace?

I'm trying out ptrace system calls, I just discovered Cross Memory Attach from Christopher Yeoh. I wonder which one is better in term of performance between Cross Memory Attach and ptrace. Thanks in ...
1
vote
1answer
17 views

How do I run multiple processes with the same process group id?

I am learning how to use the killpg syscall. So for an experiment, I want to start two new processes with the same pgid and then attempt to kill them using killpg. I read about setsid so I tried ...
0
votes
0answers
12 views

Does the main thread of a given process have a Thread Control Block?

If there is a process with a PCB, consisting only of a single execution thread. Does this thread also appear as a TCB?
1
vote
0answers
23 views

Why are processes grouped by a PGID? [duplicate]

I am interested why processes are grouped additionally while having already a PPID and PID. What's the advantage of process groups?
0
votes
0answers
7 views

Concurrent requests from node.js process are far too slow - is the OS limiting them

I have a node.js script, it makes a http request to a url N number of times using two different techniques. First it does it serially, then it does it using the node.js Promise api (all the requests ...
37
votes
6answers
5k views

Is there a way to pause a running process on Linux systems and resume later?

I have to copy files on a machine. And the data is immensely large. Now servers need to serve normally, and there are usually a particular range of busy hours on those. So is there a way to run such ...
0
votes
0answers
37 views

How to display `top` results sorted by memory usage by a process in KB/MB?

I have known about top command. When I using this command, I got only the memory usage of a process in terms of PERCENTAGE(%MEM) only. Is there any option to get the memory details in terms of Bytes(...
1
vote
5answers
60 views

Stop program from writing to a deleted file

One of our systems has a growing log file (we will be addressing) but currently the application owner will delete the file with rm then wait for the next maintenance window to reboot. I find myself ...
0
votes
1answer
26 views

How to kill all instances of a program running apart from the newest one

I have a problem whereby my script keeps spawning new ssh processes. This shouldn't happen I know, but I would like to clean the old ones up from time to time. If I do : ps -ef | grep "ssh" | awk ...
0
votes
2answers
25 views

Centos 7 rsyslog service issue

I have a problem concerning rsyslog. After system reboot, the service does not start after a few tries. I noticed, that pid file still exists after reboot, and after rm /var/run/syslogd.pid I can ...
0
votes
0answers
17 views

autossh creating many processes every time

I'm using autossh to connect to a reverse SSH tunnel. I run it from startup. However, I was facing problems in that the tunnel sometimes goes down. I created a script which checks if the tunnel is ...
3
votes
1answer
44 views

Can I make a process become a job of a bash process?

Given an interactive bash process and a process which wasn't started from the bash process, is there some way (program) which can make the process a job of the shell? This may sound impossible, but ...
1
vote
1answer
116 views

systemd: restart service if any of the forked processes are killed

Is there any way of auto-restart a systemd service if any of its forked processes are killed? After creating a systemd unit file for Control-M [Unit] After = network-online.target After ...
12
votes
3answers
4k views

I see pids above 400,000 why is that? Does it indicate something is wrong?

Today I just noticed that my process IDs are very high, in the 400,000 (i.e 449624). When I run ps -ef | more, that's when I noticed it. Is that normal or does that indicate a problem? Otherwise the ...
4
votes
2answers
177 views

Getting information about short-lived processes

I want to trace existing process and especially their parameters (like environment variables, cwd directory, stdout and so on). I can do it. However, I cannot get that information about short-lived ...
0
votes
0answers
14 views

Question on Netstat output “app --node-in” & other

While doing "netstat -p", I got result out of which, I am unable to understand below output:- unix 3 [ ] STREAM CONNECTED 3889891 23976/app --node-in unix 3 [ ] STREAM CONNECTED 33223 ...
2
votes
0answers
52 views

How to get a PID/name/path of a process that sends a network packet?

We have an application that sends some data over the TCP/IP network. We don't know which process that would be, but we want to target it. All we know is the following nftables log: kernel: * OUTPUT * ...
-1
votes
1answer
19 views

How do I check how much RAM a process consumes like the way `time` is used to measure the elapsed time?

How do I check the maximum amount a RAM a process uses similar to how time works? $ time mvn package real 0m35.796s user 0m32.925s sys 0m1.559s $ maxmem mvn package 688 MB
0
votes
0answers
13 views

Killing a thread in Python (which is descendant of current process) [duplicate]

Normally, Linux threads cannot be killed outside the main proces's scope, except by killing the main process itself, however, I need to do so. I made a threaded program which needs to have a complete ...
0
votes
1answer
35 views

AIX “rmsock” showing wrong pid listening to a tcp4 port

How to get the real listener PID in AIX 7.1? Shouldn't rmsock work as widely described on the internet? https://www-01.ibm.com/support/docview.wss?uid=isg3T1019570 The case: There is a program that ...
3
votes
2answers
776 views

Linux command that spawns multiple processes

I am looking for a linux command (like ls, time or anything similar) that spawns multiple processes. Anything which is to be run from a command line and not a shell script. The reason is I want to ...
1
vote
1answer
116 views

Linux Kernel Mode Vs User Mode

I'm trying to better understand the process of switching from user mode to kernel mode on linux systems. When a process requires access to the low level HW/restricted memory spaces, does it issue a ...
-1
votes
2answers
122 views

Why does the command ps not display the entire list of processes?

If the command ps awx | grep -v grep is run the following output is produced. The list below is the last 20 lines of the complete output. 4247 pts/1 Ss+ 0:00 /bin/bash 4442 ? S< ...
0
votes
1answer
55 views

Whould someone explain procstat output memory information?

I use the command procstat -r $(pidof myprocess) and I get the following output... PID COMM RESOURCE VALUE 84867 myprocess user time 00:...
0
votes
1answer
72 views

Kill remote process via ssh

I have a process that I want to kill remotely. I tried ssh remotehost "kill -9 $(ps -aux | grep foo | grep bar | awk '{print $2}')" but this returns the error kill: usage: kill [-s sigspec | -n ...
1
vote
0answers
21 views

Determine average and maximum execution time of a task by using ftrace/perf

I've gathered some traces containing scheduling events ('sched:*') by using ftrace and perf record. By analyzing the results many of my questions could already be answered. However, I was wondering ...
0
votes
1answer
66 views

How to check which process is writting on FileSystem Solaris

I need to identify what process is writing non-stop on the Disk. I tried to run prstat -t to get the list of the processes running, but I can't identify/find which process it is. running df -k , I ...
1
vote
2answers
38 views

How to track which process is generating network traffic?

After fresh system install (opensuse Tumbleweed) I have observed strange activity on network monitor - some app is generating small network traffic (sending and receiving data)... how to track which ...
1
vote
0answers
48 views

Bring Java process to the foreground by its PID [closed]

I am using Ubuntu 16, and I am trying to have multiple Java processes which I can track each process by its PID. They each have an X11 window. Is there any way to bring the Java task's window to the ...
0
votes
1answer
47 views

Process appear by “netstat” but doesn't appear by “ps -a”

I have a machine in my organization that I sshed and received a terminal. When I run netstat -ntlp I received: [root@webtl1 ~]# netstat -ntlp Active Internet connections (only servers) Proto ...
1
vote
1answer
28 views

Are processes bound to cores?

Let's say I have a CPU with lots of cores. Is a given process, once started, bound to one of the cores? Does that mean that a process can become sluggish even if there are several unused cores? For ...