The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
20 views

Is there a process logging tool for solaris?

Is there an existing tool for solaris/unix that keeps a history trail of the list of running processes. I'd like to be able to review backwards in time what processes were active/running. I can ...
0
votes
1answer
42 views

How to kill only current process and continue with shell pipe-line?

I have 2 related Doubts about Bash. (Q1) Consider tail -f SomeFile | wc, a fictitious command-line, where tail is used to simulate a command (C1) which runs for a long time, with some output from ...
0
votes
1answer
80 views

kill processes in one line with kill, awk, ps, and grep

I have a few processes that spring up and I am able to print a line of the pgid's that I would like to enter into a kill command. here is what I have: sudo ps o pgid,args | grep mininet: | sudo awk ...
2
votes
2answers
25 views

How can you print arguments of command in ps?

sudo ps o gpid,comm reports something like 3029 bash but the command has parameters --arbitrary -other -searchword is there a way to display these arguments?
5
votes
2answers
130 views

Systemd and process spawning

Don't normally post here but I am ripping my hair out over this one. I have a Python script that forks when it launches, and is responsible for starting a bunch of other processes. This script used ...
1
vote
0answers
23 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 ...
0
votes
1answer
53 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> ...
2
votes
1answer
176 views

Orphan process's parent id is not 1 when parent process executed from GNOME Terminal

I start a new process from GNOME Terminal and then this process fork a child. But when I killed the parent process the orphaned process's parent id became something other than 1 which represent init ...
0
votes
0answers
96 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 ...
3
votes
1answer
61 views

Set the affinity of a process from a shell script as it is being launched

I have a script (.sh) where I launch applications like this #!/bin/sh ./application1 configuration1.cfg param1 param2 param3 & sleep 2 ./application2 configuration2.cfg param1 param2 param3 ...
0
votes
2answers
44 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 ...
1
vote
0answers
144 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 ...
0
votes
1answer
55 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 ...
4
votes
6answers
1k views

grep invading my ps [duplicate]

When I'm checking for some process, I usually write ps aux | grep myprocess And sometimes I get the output of eimantas 11998 0.0 0.0 8816 740 pts/0 S+ 07:45 0:00 grep myprocess if ...
2
votes
2answers
134 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
74 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 ...
0
votes
1answer
134 views

Why kernel threads are treated as processes

In output of the ps command like the one below (kthreadd,ksoftirqd,kworker) , i can see that there are some processes that don't have an executable file and i find out that's because they are kernel ...
3
votes
1answer
49 views

create a realtime machine by assigning CPU cores to critical processes

I'm using an Udoo board for running two critical processes. It can run Ubuntu ARM edition and it has a Quadcore processor. I need to set the affinity of all the processes afinity running and the ones ...
4
votes
2answers
123 views

Can I attach a GUI process to a “surrogate X server”?

I have been in a situation where my desktop has crashed and become unresponsive. (In my case it was the Cinnamon DE, and I have yet to try cinnamon --replace from the commandline, BTW) I was using a ...
0
votes
0answers
491 views

Detach a process from Sh (not Bash) or “disown” for Sh (not Bash)

Consider a shell script executed by Sh, not Bash (and I can't change it, and can't use a shebang, it's ignored). The & operator works, but disown $! does not and makes Sh complains “disown: not ...
5
votes
2answers
167 views

How can I see i/o stats for a briefly running process?

For long running processes like init, I can do things like $ cat /proc/[pid]/io What can I do if I want to see stats for a briefly running process such as a command line utility like ls? I don't ...
0
votes
3answers
79 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
3
votes
1answer
298 views

Process management and pkill

I've been studying process management using shell scripts and I'm starting to realise how difficult it is to make sure that it's done right. For example, you can record the PID of a program to a ...
1
vote
3answers
80 views

How can i get the process with the biggest pid?

How can I get the process with the biggest pid using ps?
4
votes
1answer
229 views

SIGKILLing after a grace period

I've seen a lot of process managers that try to do this. It was my understanding that you should only use SIGTERM to kill a process. The process could take an unknown amount of time to clean up after ...
0
votes
1answer
47 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 ...
7
votes
2answers
2k views

Simulate an unkillable process in D state

For catastrophe testing scenarios on out server environment we're looking for an easy way to make a process stuck in D (uninterruptible sleep) state. Any easy ways? An example C sample code would be ...
2
votes
1answer
129 views

kernel event listener

I wonder if there is something similar to an event listener in UNIX that a program can subscribe to? Specifically I want to know: Start and end times of a user session Start and end of the ...
2
votes
1answer
65 views

how to know the use of my applications?

I want to know how long my programs have been used. For example if I use my web browser I want to know the start and the close time to obtain a total of use time. Basically I want to know when an ...
5
votes
2answers
324 views

Process owner vs process user (Gnome's system monitor)

Gnome's system monitor has a "User" column in the Processes tab. There's also an "Owner" column, (that seems to be hidden by default). Most of the processes have the same values on both columns. ...
4
votes
1answer
70 views

How to detect a desktop application hanging

I want to write a script that will detect whether a particular desktop application is responding and kill it. Is this possible? I know I've seen the GNOME desktop put up a "Application is not ...
11
votes
2answers
1k views

What does a niceness value of (-) mean?

According to the man page, and wikipedia; nice ranges from -20 to 20. Yet when I run the following command, I find some processes have a non numerical value such as (-). See the sixth column from ...
3
votes
1answer
154 views

What's the correct value to base the maximum number of CPU's to sched_setaffinity to?

I have some confusion as to what's the correct value to use for the number of CPU's I can use to make a CPU_SET for a sched_setaffinity call on my system. My /proc/cpuinfo file: processor : 0 ...
4
votes
1answer
166 views

Reporting cpu hogs

Once in a while some program (ok, usually it's firefox) will start eating up nearly 100% of a processor's cpu time, heating up the processor and driving down by laptop's battery life. Since it's not ...
1
vote
3answers
275 views

How do I start a server via ssh and have it run after I log out?

I ssh into a virtual server and start up a web server. Everything runs as expected. But when I close my terminal on my laptop, the process dies on the virtual server. How do I fix this?
4
votes
1answer
207 views

What is the default or most commonly used multiprocessing model in Linux? Symmetric or Asymmetric?

What the multiprocessing model for Linux? Is there a default or most commonly used model? Is it similar or very different from say BSD or even the MS Windows kernel? If SMP is used normally, can ...
2
votes
5answers
481 views

Replace instance of process in place?

I suspect this is not doable just because of the security implications, but here's what I'd like to do. Basically we run a bash shell-script on our CentOS server that calls Program-A (in our case ...
28
votes
4answers
2k views

python vs bc in evaluating 6^6^6

I am evaluating the expression 6^6^6 using python and bc separately. The content of the python file is print 6**6**6. When I execute time python test.py, I get the output as real 0m0.067s ...
3
votes
1answer
220 views

Better way to kill all processes with a handle to some file

This kills every process with a handle to file /foo/bar (in bash): lsof /foo/bar 2>&1 | grep "/foo/bar" | sed "s/ */\\t/g" | cut -f 2 | while read PID; do kill $PID; done This does not ...
75
votes
2answers
8k views

How does Linux “kill” a process?

It often baffles me that, although I have been working professionally with computers for several decades and Linux for a decade, I actually treat most of the OS' functionality as a black box, not ...
5
votes
3answers
3k views

Why do top and ps show different PIDs for the same processes?

When I run top -H, I see that my multiple mysql threads all have the same PID. However, in ps -eLf I see each one has a different PID: ps -eLf UID PID PPID LWP C NLWP STIME TTY ...
0
votes
2answers
283 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 ...
2
votes
1answer
139 views

Process overwrite access restriction

I want to run a program so that it can only create new files and not overwrite existing ones. Does something like this exist? $ fsaccess --can read,write --not overwrite --command bash -c 'echo ...
6
votes
3answers
2k views

Using `kill -s 0 $pid` vs `[[ -e /proc/$pid ]]` to detect if PID is running

One of the idioms often used to check if process is running is to use kill -s 0 $pid. My question is, does it have any upsides over using [[ -e /proc/$pid ]] construct? The script I'm writing is ...
1
vote
2answers
70 views

What information about a process is retrievable after it is terminated? [duplicate]

After a process has been terminated, is it possible to retrieve any information about it, such as when it started and finished, &c. Is it possible to enable logging of this information?
4
votes
3answers
110 views

Disallow File IO for a process except for FIFOs

How do you start a process that cannot do any file IO (opening / closing files, creating / deleting files, reading / writing files, etc.), except to read and write to pre-created FIFOs? (chroot will ...
2
votes
2answers
665 views

How to make processes not die after its parent dies?

I've been messing with forkbombs and noticed that if I just fork() processes repeatedly, killing the initial process will bring down the whole tree. This is not the case for forkbombs written in BASH ...
1
vote
2answers
214 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): ...
11
votes
3answers
4k views

What's the difference between pkill and killall?

I know that pkill has more filtering rules than killall. My question is, what is the difference between: pkill [signal] name and killall [signal] name I've read that killall is more effective ...
0
votes
2answers
307 views

UNIX- Identify which processes are running more that 6hours

I need to know which processes are running more than 6 hours in UNIX. How can I find those out?