Questions tagged [process-management]

Use this tag when the topic is about system process management. Commands used for this are like ps and kill -9 xxxx and service xyz start|stop|restart and htop, for example. Often used in conjunction with memory management.

Filter by
Sorted by
Tagged with
1
vote
1answer
196 views

Systemcrash suexec forkbomb.sh ulimits

I got this script named fork.sh: #!/bin/sh forkbomb() { forkbomb | forkbomb & } ; forkbomb If I call it through suexec my whole system will consume 99% cpu. To prevent a normal bash forkbomb I ...
1
vote
0answers
122 views

Find the creator of a task

I would like to find the creator task of an arbitrary task in the Linux kernel. However, I am not sure, if there is a way to do this in general. Normally, you can find the creator of a task via the ...
1
vote
1answer
670 views

isolcpus doesn't work on Ubuntu 14

I added isolcpus=0 to the end of the following line to the file /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=0" The idea, as I understand it, is to reserve core 0 from having ...
1
vote
0answers
659 views

Start command and stop command in terminal on keyboard (hotkey) shortcut press?

I have seen How to execute a script in shell when a shortcut key is pressed, but that is not what I want. If you have used recordmydesktop, you may have noticed the following in its manual: After ...
1
vote
2answers
459 views

KDE becomes slow

I experience problems with KDE 4.11.1 on Arch Linux. It suddenly becomes laggy and unresponsive and just as suddenly returns to the normal state after some time. Normal CPU load (KSysGuard): Current ...
1
vote
0answers
80 views

Building a process Watchdog [duplicate]

I intend to write a process watchdog that runs out of cron or similar that watches all of the core processes denoting things like run state, VMstat, Inet operations and reports it to a file or ...
1
vote
1answer
1k views

Very large values for utime and stime for foo. Is foo still running?

I am running a program foo It has been running for close to 30 days now (even more) Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
1
vote
1answer
6k views

How to check if process already exists in python script? [duplicate]

Possible Duplicate: Check for process already running in webfaction? How can I check if a process is already being run using Python + Django on WebFaction hosting? For example, my process name ...
0
votes
2answers
1k views

gracefully terminating processes with killall <processname>

I am using several instances (profiles) of Icedove (Thunderbird) and when I need to close all of them, I use: killall icedove According to man killall, if no signal name is specified, SIGTERM is ...
0
votes
1answer
2k views

What is the difference between nice and renice?

What is the difference between the two commands nice and renice to manage process priority?
0
votes
2answers
482 views

Calculating CPU time of process in RHEL 5.3

For a process management,I would need to remove a process that exceeds a certain amount of CPU time, for example 1 hour.In PS command ,it has TIME parameter shows the total CPU time of a process .So ...
0
votes
2answers
254 views

Is there the possibility to set a parent process when creating a new process?

I'd like to set the parent of a newly started process, is that possible? Example, let us assume that we start a new desktop environment session via a login manager, so our process tree would look ...
0
votes
2answers
1k views

How do I know the killed process name by process ID

I killed a process by process ID accidentally, but now I need to know the process name.I checked the id number under folder /proc,but I got anything. how can I know the process name please.
0
votes
1answer
466 views

Process name 'masked' by /usr/bin/python and /bin/su

I'm trying to use the pidof command to see my script is already running as I only want this executable if the script is not already running, however, it seems the pidof command is not returning the ...
0
votes
1answer
540 views

How do I run a process and send it a SIGNAL while its running?

I need to run a program xyz. It finishes execution in a few seconds. It has some signal handling I need to test. From the shell or a bash script how do I execute the program and while it is executing ...
0
votes
2answers
249 views

What are some practical purposes for using renice? [closed]

I'm having a hard time finding a purposeful need for using renice more often, and I would like to know if there are any scenarios in which using process prioritization and adjusting it on-the-fly has ...
0
votes
1answer
200 views

linux + top command

I run the top command on my linux machine and I see that vim command take like 99.5% CPU PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
0
votes
1answer
59 views

Why below code is not able to unblock SIGINT signal

I am trying my hand on Linux Signals. Where I have created a scenario mentioned below: Intially block all SIGINT signals using sigprocmask(). If sender send SIGUSR1 signal then unblock SIGINT for ...
0
votes
1answer
39 views

Are processes within screen treated differently from foreground processes?

Assume I have a long running process, long_running_proc with a single TCP connection to host host.example.com. Is that process treated differently, by the OS or the shell, when it's run as a ...
0
votes
1answer
37 views

File manager instances not showing among running processes

I've over 10 windows of a file manager (Thunar, on Xubuntu Core 18.04) open, but ps aux|grep thunar shows nothing (except for the grepped string). Why? ps -e doesn't not show anything either. EDIT: ...
0
votes
1answer
566 views

Is /proc folder and process details really exists on hard drive [duplicate]

I am a little bit confused about /proc directory. Each process frequently updating its state, memory info, progress etc in their process. My question is that the /proc directory keeps the memory or ...
0
votes
1answer
26 views

Utility that can be configured to run two commands, and kill both when one finishes

Is there a common utility (Ubuntu, perhaps OSX) that can run a server serve ./public, then run some tests ./run-chrome-tests.sh, and once the tests are finished, kills the serve ./public. This can be ...
0
votes
1answer
1k views

Find out why a running process dies

I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?
0
votes
1answer
83 views

Killing some processes also kills others that I do not want to kill

I am goofing around in Metasploitable and trying some commands. Whenever I kill a process using fuser -k 23/tcp to close the port, I get other processes also killed by the process and their ports ...
0
votes
2answers
111 views

Opened file with several million lines: how to close it?

I've just accidentally opened rockyou.txt in Kali Linux on a fairly slow computer. It has now been sitting on the desktop loading the 30million words for over an hour. It is not frozen, as I can still ...
0
votes
1answer
557 views

Need script to kill python process with low CPU usage

I've created a very large and complex python program and I now know it has a serious bug that I'm having a very hard time pinning down. I'm using this code in a production environment so I need a stop-...
0
votes
1answer
518 views

Why PPID is different when opening from terminal and when opening by doubleclicking

I am using Linux. When i opened gedit program in gnome-terminal by gedit command it has opened the graphical gedit text editor. then the gedit has PPID bash ashokkrishna@ashokkrishna-Lenovo-B560:~...
0
votes
3answers
156 views

Idiomatic way to kill -9 only if “graceful” way doesn't work?

Is there a common way or existing utility to do the following? kill a process Give it a few seconds to shut down gracefully kill -9 it if it hasn't stopped
0
votes
1answer
76 views

How can I make my command more susceptible to system slowdowns so as to use it as a visual QoS widget on my desktop?

I had some system slowdown event1 after mistakenly using a command so I thought I could use a desktop "widget" to visually show quality of service or at least show when QoS was degraded and get some ...
0
votes
1answer
22 views

Identify idle or minimized process

I'm trying to know if some GUI process is idle o minimized in Linux, using Net-SNMP. I've been doing research and as far as I know, SNMP seems to be designed for monitoring services, not processes ...
0
votes
1answer
89 views

How to hide script from process list in Linux?

I have a script in linux: #!/bin/bash export DISPLAY=:1 value=$(</home/pace/Desktop/BODVersion.txt) cd $value gnome-terminal \ --tab -t "CTCLManager" -e " sh -c 'sleep 1s; ./startapp ...
0
votes
2answers
691 views

Why should parent process wait (to terminate) until all of its child process terminates?

I know there is no enforcement for the parent process to wait until all its child process terminates. However it's a convention followed. Furthermore, I know that if parent process terminates before ...
0
votes
2answers
75 views

Shell Script to fetch linux processes and show the process count for individual user as “.” [closed]

Eg. Processes being run by various users are as below. root 5 xuser 3 yuser 1 Then the script should give the output as: root ..... xuser ... yuser .
0
votes
1answer
193 views

CRIU for non-root users

CRIU doesn't support in non-root user environment, to my knowledge. Does anyone have got a patch for this? -a Linux enthusiastic.
0
votes
1answer
151 views

Bash script if statement returning incorrect result while bash -x works

I have a simple bash script that checks if a program is running and actions accordingly. #!/bin/bash check_running=$(pgrep -x redshift) if [[ -n "$check_running" ]]; then echo "1" else ...
0
votes
1answer
4k views

How to find difference between two epoch time stamps? [duplicate]

I am writing a script to kill a job which runs more than 30 minutes. My epoch time format is like 1503935475067 and I am using current_time_stamp=`date +%s%3N` How to find difference between two ...
0
votes
1answer
39 views

List of processes allowed to run

Is there a program in Linux to control which processes are allowed to run with some kind of control list? So that, when you will try to run a process that is not in the list you will be notified ...
0
votes
1answer
5k views

How to force a PID to terminate? [duplicate]

Yes, I've tried all the basic kill, pkill, etc. methods that come up with a Google search. Sometimes it works, other times it seems something is preventing the process from terminating. There is no ...
0
votes
1answer
403 views

Custom “garbage collector” to manually close a program

I'm running Ubuntu 16.04 I have this process X running from multiple tty. I run it from other pseudo terminals using the screen command and it also runs from crontab. This program is launched from a ...
0
votes
1answer
1k views

How to Check a Process is Running on Another Server

How do I go about checking that a certain process is running in another box and return a value? For example, if I wanted to check that process 'FTP' is running in 192.168.1.1 from box 192.168.1.2, how ...
0
votes
1answer
672 views

Are blocked and blocked/suspend processes put into the same queue?

In a 7-state process model (new, ready, blocked, running, blocked/suspend, blocked/ready, exit), are processes in the blocked and blocked/suspend states for each event that processes are blocked on ...
0
votes
1answer
510 views

killing a job running in the background

I have started running a long job by creating a script that executes several commands on 20 or so datasets sequentially. I began in the xterm window with $ script.scr then typed <ctrl-Z> ...
0
votes
0answers
12 views

Where on disk is the config file of pm2-logrotate module?

Simple question. I'm trying to find the config file of pm2's logrotate module to edit it manually. Unfortunately this information is not provided in the Github repo's README. So where is this file? ...
0
votes
0answers
15 views

Return to waiting terminal after finished with GUI app (for external mergetool)

When using an external GUI app for git mergetool, the shell sits in the background waiting patiently. When I save and close the GUI window, the shell returns to the foreground and git is main app ...
0
votes
0answers
49 views

What Happens In Linux During Context Switching

During process execution in Linux, which action causes the context switching after process time slice? Is it uses of timer interrupt causing or making the CPU Scheduler Context switching or is it ...
0
votes
1answer
16 views

prlimit causes error 'Argument list too long' with some resource limits

my issue is this: prlimit -t5 echo foo works fine (cpu limit) but prlimit -s5 echo foo (stack size limit) prlimit -v5000 echo foo (address space limit) both return: prlimit: failed to execute echo: ...
0
votes
1answer
56 views

How can I view threads for a running process that is creating threads?

I made a very small program that creates two threads: #include <pthread.h> #include <stdio.h> #include <unistd.h> void *start() { printf("Am a new thread!\n"); ...
0
votes
1answer
191 views

How to avoid zombie process while working with named pipe?

We normally do the writing job to a FIFO file in background using a control operator &. Something like below. if [ ! -p "/tmp/mysqld.init" ]; then mkfifo /tmp/mysqld.init fi echo "something"...
0
votes
0answers
27 views

Get output of server crash from server re-spawning script

I currently have Homebridge set up on my raspberry pi. When the pi boots, it starts a script which attempts to keep homebridge alive. I originally took the script from this answer which walks you ...
0
votes
0answers
212 views

can two running processes share the complete process image in physical memory, not just part of it?

can two running processes share the complete process image in physical memory, not just part of it? Here I am talking about the Linux operating systems(eg. Ubuntu). My thinking: I think it is ...