Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
1answer
34 views

How to add a progress bar to cryptsetup luksFormat?

Example command. cryptsetup --hash sha512 -c aes-xts-plain64 --key-size 512 luksFormat /dev/loop0 This can take quite a while for big files / on slow disks. How to add a progress bar?
-1
votes
1answer
60 views

What do brackets mean in the output of pstree?

What are the differences between [] and {} and [{}] used to enclose a process in the output of pstree? I guess [] is used for specifying more than one processes. For example, ...
0
votes
0answers
23 views

How do you adjust other user's job priority?

Let's say your coworker started a very intense process and went home. It's occupying most of the CPU resources, and you can't do your stuffs because of it. If it was your own process, you could run ...
4
votes
0answers
109 views

How do I execute in background / return early?

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account. I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...
0
votes
1answer
50 views

/usr/bin/X :0 -audit process

Hello I am trying to solve some internet problems that I have. It is a university computer and I do not have root access. I want to understand what is this processor, that root has started, and if you ...
5
votes
2answers
284 views

How to determine what instructions a process is executing?

I know about strace and ltrace, but that only tells me what system calls and library calls a process is executing, respectively. I would like to know exactly what instructions a process is executing. ...
1
vote
1answer
96 views

How to kill - softly? [duplicate]

If I want to kill a process as careful and politely as possible, which signals should I use in a kill command, in which order? I would like to give the programm any kind of time to clean up, if it ...
3
votes
1answer
416 views

Process history in Unix/Linux systems

I know that ps -efl shows running processes on *nix systems. I would like to check history of the (past) processes that have been run on a particular machine, preferably with all the information ps ...
0
votes
1answer
51 views

Loginuid, should be allowed to change or not (mutable or not)?

I am trying to configure the linux kernel. I was confused by Make audit loginuid immutable (AUDIT_LOGINUID_IMMUTABLE) [N/y/?]. The help says: +config AUDIT_LOGINUID_IMMUTABLE + bool "Make ...
3
votes
1answer
71 views

Different between `ulimit -e` and `renice`?

I would like to run a backup script in low CPU and disk I/O. Is there any different between this: #!/bin/bash ulimit -e 19 ionice -c3 -p $$ and this: #!/bin/bash ionice -c3 -p $$ renice -n 19 ...
5
votes
2answers
81 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
2answers
76 views

Using /proc/stat for the number of processes running on the system

How does one find out the true number of processes that is running on your system. A number of articles mention using ps in order to count the number of processes. But recently I looked at cat ...
2
votes
0answers
42 views

Why are the process priorities not respected?

I was running four jobs in the background with HTCondor. It sets the priority to 10. Then I was compiling something with make -j4 in the foreground (priority 0). However, the HTCondor jobs still got ...
2
votes
1answer
52 views

The current path of a process

Suppose I write a program, which outputs a file under a relative path (as opposed to a full/absolute path) - let's say, the current path. Then I compile it and store the executable under some dir ...
4
votes
1answer
497 views

Maximum memory usable by a 32 bit RHEL 6 system

I have installed a 32 bit RHEL OS on a 64 bit system. From the wiki page of PAE: The Linux kernel includes full PAE mode support starting with version 2.3.23, with Linus Torvalds mentioning ...
0
votes
1answer
48 views

Process's father after setpgid(0,0);

I have a process P1 (child of some parent process P0) both in the same process group. P1 somewhere in his code runs: setpgid(0,0); then a new process group is created (where the group leader is P1). ...
5
votes
4answers
855 views

chdir(<directory>) doesn't change directory after exiting to shell

I wanted to make a simple C program to change to my project directory. Its content is following: #include <unistd.h> int main(){ chdir("/home/enedil/projects/algo"); return 0; } I ...
3
votes
1answer
550 views

What is meant by “Unknown instance” when restarting a service?

I am trying to get vsftpd file server running on Ubuntu 13.10, I'm unable to connect to the server from another network, although this other network is connected to the server's network and ping is ...
1
vote
1answer
42 views

How can I tell why a process is waiting?

I'm trying to run a command on OSX Mavericks and it seems to be hanging. I found out that Control + T is a Unix command to show the status of a foreground job. Pressing it several times over the ...
2
votes
1answer
190 views

Kill any service running at a specific port

I am trying to write a script that kills service running at a specific port. This is my script: a=$(ps ax | grep 4990 | grep java | awk '{print $1}') kill -9 $a It's a java program. This script ...
13
votes
2answers
843 views

How to find out what process is writing to STDOUT?

I have two instances of a process running. One of them is "frEAkIng oUT!" and printing errors non stop to STDOUT. I want to kill the broken process but I have to make sure I don't terminate the wrong ...
1
vote
3answers
47 views

How can i get the process with the biggest pid?

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

long format of ps command in Solaris

Jobs with a long command-line is not printing in Solaris: bash-3.2$ /usr/ucb/ps auxwww | grep ftf | awk '{print $NF}' | head -5 /proj/cmp01/app/btws/cfg/btw /proj/cmp01/app/btws/cfg/btw ...
2
votes
0answers
55 views

Cgroups - memory subsystem

I want to set the memory.limit_in_bytes parameter for a control group and disable OOM, so processes freeze when the limit is reached. But i want to change that limit dynamically, if there is more ...
1
vote
2answers
193 views

Do all Linux processes write EOF to stdout when they are terminating/have finished terminating?

I'm having trouble with sending shutdown -h 0 to a lxc Debian container (i.e. executing this command in the lxc) with with the python pexpect module (in a python script). In this module the user can ...
0
votes
1answer
98 views

How to determine who started a process? [duplicate]

every few minutes I found this process running root 949062 100 0.0 37204 1488 ? R< 05:14 0:51 /usr/local/cpanel/3rdparty/bin/clamdscan --quiet --no-summary /etc/passwd It's ...
2
votes
1answer
233 views

Why is the PGID of my child processes not the PID of the parent?

So I keep reading everywhere that this command should terminate all child processes of the parent process: kill -- -$$ Using a negative ID with the kill command references a PGID and from the ...
4
votes
1answer
149 views

Launch background processes in one group and later kill them all

The other day I tried writing a script that would kill a PID and all its children processes, but after spending some time on it, I decided it wasn't trustworthy, because sometimes some of the children ...
3
votes
1answer
92 views

Monitoring filesystem activity

Say, I have a program, and I want to monitor its filesystem activity (what files/directories are created/modified/deleted etc.) This program may be capable of spawning further processes, and thus, I ...
1
vote
1answer
30 views

killall <processname> throughout the system [closed]

I'm opening two terminal windows. Terminal 1 - I run process1 Terminal 2 - I run process2 I then terminate both process using Ctrl+Z in each window. I type killall -9 process1 in Terminal 2 , ...
3
votes
2answers
84 views

CPU percentage of a single process

How do I get the average CPU percentage (for every second) consumed by a single process since it starts until it ends (exists)? Could I make this with Top?
4
votes
4answers
207 views

Single instance of script, but only with same arguments

I have this beautiful little code here that will exit from a script if there's another instance of it running: single_instance(){ if pidof -x "${0##*/}" -o %PPID >/dev/null; then exit ...
5
votes
1answer
103 views

Why does `bash -c somecommand` sometimes not leave a bash process?

On an Ubuntu 12.04, with GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu), I tried the following command: $ bash -c 'pstree -s $$' init───sshd───sshd───sshd───bash───pstree $ bash -c 'pstree ...
1
vote
3answers
405 views

detect process eating cpu without: top, htop, ps?

I went thru a problem where I could only guess what process was eating the cpu. My cpu usage was about 80% for all cores at psensor. I tried htop, top and ps -A -o pcpu,pid,cmd --sort +pcpu (the ...
2
votes
0answers
47 views

CGroup Processes Not Terminated even when main process has been killed through Systemctl stop command

I am running systemctl stop process command for some process. Please find the output for systemctl status process below: Loaded: loaded Active: deactivating (stop-sigterm) CGroup: ...
1
vote
2answers
25 views

Meaning of PF_VCPU and PF_WQ_WORKER

do you know what the constants meaning is defined in linux/sched.h: #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ #define PF_WQ_WORKER 0x00000020 /* I'm a workqueue worker */ What ...
1
vote
1answer
13 views

how to suspend other nonrelated processes to allow a proces in interest to occupy the CPU?

Is it possible to first find out what processes are necessary to run a process in interest, and then suspend all other unrelated processes to allow the process in interest to use the CPU as much ...
0
votes
1answer
482 views

How to compute Linux slab memory leak in GNU/Linux ( proc/slabinfo ) of running process

How to compute Linux slab memory leak in GNU/Linux ( proc/slabinfo ) of running process ? I'm want to free usage is not working properly . I want to way how to check Memory Usage & Memory Leak ...
-2
votes
1answer
61 views

How are zombie processes handled when the parent dies?

Which technique does the Unix system use to remove zombie processes whose parent has terminated?
2
votes
1answer
63 views

Does this dispatcher produce zombie process?

I have such a dispatcher shell script. while read line do java TestProg $line & done < $tasklist On the zombie process Wikipedia page, it says if a parent fails to call wait, the ...
0
votes
1answer
423 views

How to figure out memory leaks? [closed]

I'm running Ubuntu 14.04 on Digitalocean to host my blog. I'm using HHVM + nginx + MySQL. Every few hours (~12h), there's no more RAM left and nginx throws an 502 error. I check the memory usage for ...
1
vote
1answer
77 views

Getting the parent path from a script

I have a bash script foocaller, which calls a ruby script foo: foocaller /path/to/foo Within foo, I want to get the path of foocaller. Following this suggestion, I put the following code to do ...
0
votes
1answer
43 views

get cpu by user

Working with monit I need create an alert that get cpu usage of system users, so: top -b -n 1 -u user1 | awk 'NR>7 { sum += $9; } END { print sum; }' seems a good solution but I'm not sure about ...
1
vote
1answer
180 views

Understanding the difference between pid_max, ulimit -u and thread_max

I am trying to understand the Linux processes. I have confusion on the terms pid_max, ulimit -u and thread_max. What exactly is the difference between these terms? Can someone clarify me the ...
4
votes
3answers
176 views

how to determine how many times pid_max wrapped?

Is it even possible to know that? may be some kind of tests are required to be performed in order to find that information? My system, just after I login, seem to have already wrapped the max_pid, so ...
1
vote
2answers
56 views

Get command PID and send to another [duplicate]

I wanted to know if I can execute a command from the terminal and right after the command started I send its PID to another command to be monitored. I need to do something like this, dd ...
39
votes
4answers
3k views

Why do we need to fork to create new processes?

In Unix whenever we want to create a new process, we fork the current process, creating a new child process which is exactly the same as the parent process; then we do an exec system call to replace ...
1
vote
1answer
558 views

kill pid is not working? [duplicate]

This is pretty weird now. I am trying to kill a process by using its pid but it is not working at all. root@machineA:/home/david# ps aux | grep modelling david 5075 0.0 0.0 1285420 29404 ? ...
7
votes
2answers
467 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 ...
12
votes
2answers
1k views

How to terminate remotely called “tail -f” when connection is closed?

I just noticed that if I execute ssh user@remote_host tail -f /some/file , then tail -f /some/file keeps running on the remote_host even if ssh connection is closed! So, after several connects and ...