File: bops

package info (click to toggle)
bosh 0.6-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 540 kB
  • ctags: 226
  • sloc: ansic: 2,008; sh: 994; makefile: 12
file content (31 lines) | stat: -rwxr-xr-x 537 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bosh

command{{
  function pad() {
    s="$1";
    while [ ${#s} -lt 5 ]; do s=" $s"; done;
    echo "$s";
  };
  PID="$(pad $$)";
  BOSHPID="$(pad $BOSHPID)";
  BOSHPPID=$(pad $BOSHPPID);
  ps -o pid,ppid,tty,stat,time,cmd x | grep -v -e "$PID" -e "$BOSHPID" -e "$BOSHPPID"
}}

refresh=1
header=1

#autorefresh:	5

preaction{{
  PID=$(echo $BOSH | cut -f1 -d' ');
}}

k=[!]		kill $PID
9=[!]		kill -9 $PID
s=[!:signal]	kill -s "$BOSHPARAM" $PID

l=[.]		lsof -p $PID
r=[.]		chrt -p $PID
m=[.]		pmap $PID
t=[.]		pstack $PID