New answers tagged

1 vote
Accepted

Can a process share unused memory with others?

You're seemingly reading it wrong. The first column is VIRT, it's inconsequential and in absolute most cases should be ignored completely. What you're interested in is RSS and each of your processes ...
user avatar
0 votes

How to chain a shell command off a non-child process exiting without a race condition?

Maybe a lock file is a good approach. You could even embed a string passed to the sub-process and put it into the lock file / part of the lock file name. The lock file could be deleted as part of the ...
user avatar
  • 1
0 votes

How to check how long a process has been running?

I wanted it in seconds and I came up with (pure bash): runtime=$(ps -o etime= -p <pid>) runtime=$(date -d "1970-01-01 $((10#${runtime: -8: 2})):$((10#${runtime: -5: 2})):$((10#${runtime: -2:...
user avatar
  • 103
4 votes

What signal do bg and fg send?

bg and fg do not send a signal. They are builtins that change how the shell behaves. How it works is that input from the user has to reach its intended destination. When you run bg (job), you're ...
user avatar
  • 66
0 votes

Unable to get PID on a Listening port for Solaris

For those kind of scripts you need to access /proc filesystem which can be done by root user. Try: sudo ./getpidfromport.sh 7777
user avatar
  • 12.9k
0 votes

How to get whole command line from a process?

pgrep -a <name> In your example : pgrep -a udhcpc pgrep does not truncate line, but ps does. For those that insist on using ps, then do that to avoid truncation : ps <processID> | tee
user avatar
1 vote

Find out what processes are writing to hard drive

fatrace can help you with that. Shameless link to my own answer on another question about this: iotop but for particular disk?
user avatar
  • 706
0 votes

Understanding maps file in /proc directory for a process

The stack entries are described in man 5 proc: [stack] is the main thread’s stack, [stack:986] is thread 986’s stack. The latter is no longer visible on kernels since 4.5. This also addresses your ...
user avatar
0 votes

service start automatically on debian 10

A service can be started in several ways. They are shown when you run the command sudo systemctl status servicname under the heading 'TriggeredBy'. These can all be stopped, started, enabled, ...
user avatar
  • 702
0 votes

Reparenting a process

Standard unix only supports orphaning processes, not reparenting. The result of orphaning is that the process's parent becomes pid 1. Changing the PID of a process is also not supported in standard ...
user avatar
  • 2,606
2 votes

Can a program output to STDERR and still return a zero exit status?

Well, I’m still not clear what this question is asking.  But, since it has been reopened, I’ll post what I said earlier.  At the risk of repeating what others (and I) have said: It is certainly ...
user avatar
0 votes

Signals table in /proc/[PID]

Yes, read "NOTES" section in man 7 signal: The /proc/[pid]/task/[tid]/status file contains various fields that show the signals that a thread is blocking (SigBlk), catching (...
user avatar
  • 1,138
2 votes

Signals table in /proc/[PID]

/proc/<pid>/status includes fields describing the given process’ signal handling; see man 5 proc for details. For example: SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: ...
user avatar
1 vote

Where and how is the scheduler running? Can I "see" it?

Your question is rather broad, I’ll address the scheduler parts specifically. Since the scheduler is a function, it runs whenever that function is called. The reason I link to Elixir is that it allows ...
user avatar

Top 50 recent answers are included