Created
April 3, 2019 12:32
-
-
Save tbg/fc3e0b20eacceb7fc65aeff1438b2ccb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> roachprod stop: Wed Apr 3 06:15:02 UTC 2019 | |
PID COMMAND | |
1 /sbin/init HOME=/ init=/sbin/init NETWORK_SKIP_ENSLAVED= recovery= TERM=linux drop_caps= BOOT_IMAGE=/boot/vmlinuz-4.15.0-1026-gcp PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/ rootmnt=/root | |
2 [kthreadd] | |
3 [kworker/0:0] | |
4 [kworker/0:0H] | |
5 [kworker/u8:0] | |
6 [mm_percpu_wq] | |
7 [ksoftirqd/0] | |
8 [rcu_sched] | |
9 [rcu_bh] | |
10 [migration/0] | |
11 [watchdog/0] | |
12 [cpuhp/0] | |
13 [cpuhp/1] | |
14 [watchdog/1] | |
15 [migration/1] | |
16 [ksoftirqd/1] | |
17 [kworker/1:0] | |
18 [kworker/1:0H] | |
19 [cpuhp/2] | |
20 [watchdog/2] | |
21 [migration/2] | |
22 [ksoftirqd/2] | |
23 [kworker/2:0] | |
24 [kworker/2:0H] | |
25 [cpuhp/3] | |
26 [watchdog/3] | |
27 [migration/3] | |
28 [ksoftirqd/3] | |
29 [kworker/3:0] | |
30 [kworker/3:0H] | |
31 [kdevtmpfs] | |
32 [netns] | |
33 [rcu_tasks_kthre] | |
34 [kauditd] | |
35 [kworker/0:1] | |
36 [kworker/1:1] | |
37 [kworker/2:1] | |
38 [khungtaskd] | |
39 [oom_reaper] | |
40 [writeback] | |
41 [kcompactd0] | |
42 [ksmd] | |
43 [khugepaged] | |
44 [crypto] | |
45 [kintegrityd] | |
46 [kblockd] | |
47 [ata_sff] | |
48 [md] | |
49 [edac-poller] | |
50 [devfreq_wq] | |
51 [watchdogd] | |
52 [kworker/u8:1] | |
54 [kswapd0] | |
55 [ecryptfs-kthrea] | |
97 [kthrotld] | |
98 [acpi_thermal_pm] | |
99 [scsi_eh_0] | |
100 [scsi_tmf_0] | |
101 [scsi_eh_1] | |
102 [scsi_tmf_1] | |
103 [kworker/3:1] | |
104 [kworker/u8:2] | |
105 [kworker/u8:3] | |
109 [kworker/3:2] | |
110 [ipv6_addrconf] | |
119 [kstrp] | |
136 [charger_manager] | |
137 [kworker/0:1H] | |
228 [kworker/1:2] | |
232 [kworker/u8:4] | |
305 [raid5wq] | |
354 [kworker/1:1H] | |
355 [jbd2/sda1-8] | |
356 [ext4-rsv-conver] | |
369 [kworker/3:1H] | |
404 [kworker/2:1H] | |
418 [iscsi_eh] | |
421 [kworker/2:2] | |
424 [ib-comp-wq] | |
425 [ib_mcast] | |
426 [ib_nl_sa_wq] | |
427 [rdma_cm] | |
438 /lib/systemd/systemd-journald PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=438 LISTEN_FDS=4 LISTEN_FDNAMES=systemd-journald.socket:systemd-journald.socket:systemd-journald-dev-log.socket:systemd-journald-audit.socket | |
447 [kworker/0:2] | |
458 /sbin/lvmetad -f PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LISTEN_PID=458 LISTEN_FDS=1 LISTEN_FDNAMES=lvm2-lvmetad.socket SD_ACTIVATION=1 | |
485 /lib/systemd/systemd-udevd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=485 LISTEN_FDS=2 LISTEN_FDNAMES=systemd-udevd-control.socket:systemd-udevd-kernel.socket WATCHDOG_PID=485 WATCHDOG_USEC=180000000 | |
957 /sbin/dhclient -1 -v -pf /run/dhclient.ens5.pid -lf /var/lib/dhcp/dhclient.ens5.leases -I -df /var/lib/dhcp/dhclient6.ens5.leases ens5 IFUPDOWN_ens5=post-up METHOD=dhcp MODE=start LOGICAL=ens5 PHASE=post-up ADDRFAM=inet VERBOSITY=0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin IFACE=ens5 PWD=/ | |
1166 /sbin/iscsid PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1167 /sbin/iscsid PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1179 /usr/sbin/rsyslogd -n PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1179 LISTEN_FDS=1 LISTEN_FDNAMES=syslog.socket | |
1194 /usr/bin/lxcfs /var/lib/lxcfs/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1208 /usr/sbin/cron -f PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1219 /lib/systemd/systemd-logind PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify WATCHDOG_PID=1219 WATCHDOG_USEC=180000000 | |
1248 /usr/sbin/acpid PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1272 /usr/lib/snapd/snapd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1272 LISTEN_FDS=2 LISTEN_FDNAMES=snapd.socket:snapd.socket | |
1333 /usr/lib/accountsservice/accounts-daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1347 /usr/sbin/atd -f PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1402 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LISTEN_PID=1402 LISTEN_FDS=1 LISTEN_FDNAMES=dbus.socket | |
1460 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin _SYSTEMCTL_SKIP_REDIRECT=true PWD=/ | |
1481 /usr/lib/policykit-1/polkitd --no-debug PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1525 /sbin/agetty --noclear tty1 linux PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=linux LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= | |
1526 /sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt220 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=vt220 | |
1545 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /var/lib/ntp/ntp.conf.dhcp -u 112:116 PATH=/sbin:/bin:/usr/sbin:/usr/bin _SYSTEMCTL_SKIP_REDIRECT=true PWD=/ | |
1621 /usr/bin/python3 /usr/bin/google_network_daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1623 /usr/bin/python3 /usr/bin/google_accounts_daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1633 /usr/bin/python3 /usr/bin/google_clock_skew_daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1647 /usr/sbin/sshd -D PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify SSHD_OPTS= | |
2286 [jbd2/sdb-8] | |
2287 [ext4-rsv-conver] | |
2527 [kworker/3:3] | |
2586 [kworker/0:3] | |
2594 [kworker/1:3] | |
3889 [kworker/2:3] | |
4689 [kworker/0:4] | |
5169 /lib/systemd/systemd --user PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify HOME=/root LOGNAME=root USER=root SHELL=/bin/sh XDG_RUNTIME_DIR=/run/user/0 | |
5170 (sd-pam) HOME=/ init=/sbin/init NETWORK_SKIP_ENSLAVED= recovery= TERM=linux drop_caps= BOOT_IMAGE=/boot/vmlinuz-4.15.0-1026-gcp PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/ rootmnt=/root | |
5244 ./cockroach start --insecure --store=path=/mnt/data1/cockroach --log-dir=/root/logs --cache=25% --max-sql-memory=25% --port=26257 --http-port=26258 --locality=cloud=gce,region=us-east1,zone=us-east1-b --join=35.196.158.128:26257 --enterprise-encryption=path=/mnt/data1/cockroach,key=/mnt/data1/cockroach/aes-128.key,old-key=plain COCKROACH_ENABLE_RPC_COMPRESSION=false GOTRACEBACK=crash COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING=1 XDG_SESSION_ID=31 SHELL=/bin/bash SSH_CLIENT=35.231.34.153 42950 22 USER=root MAIL=/var/mail/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/root ROACHPROD=4 LANG=en_US.UTF-8 SHLVL=1 HOME=/root LOGNAME=root SSH_CONNECTION=35.231.34.153 42950 10.142.15.239 22 XDG_RUNTIME_DIR=/run/user/0 _=./cockroach COCKROACH_BACKGROUND_RESTART=1 NOTIFY_SOCKET=/tmp/sdnotify341744739/notify.sock | |
5271 sshd: root@notty = | |
5314 bash -c mkdir -p logs echo ">>> roachprod stop: $(date)" >> ${HOME}/logs/roachprod.log ps axeww -o pid -o command >> ${HOME}/logs/roachprod.log pids=$(ps axeww -o pid -o command | \ sed 's/export ROACHPROD=//g' | \ awk '/ROACHPROD=(4)[ \/]/ { print $1 }') if [ -n "${pids}" ]; then kill -9 ${pids} for pid in ${pids}; do echo "${pid}: checking" >> ${HOME}/logs/roachprod.log while kill -0 ${pid}; do kill -0 ${pid} >> ${HOME}/logs/roachprod.log 2>&1 echo "${pid}: still alive [$?]" >> ${HOME}/logs/roachprod.log ps axeww -o pid -o command >> ${HOME}/logs/roachprod.log sleep 1 done echo "${pid}: dead" >> ${HOME}/logs/roachprod.log done fi USER=root LOGNAME=root HOME=/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games MAIL=/var/mail/root SHELL=/bin/bash SSH_CLIENT=35.231.34.153 44914 22 SSH_CONNECTION=35.231.34.153 44914 10.142.15.239 22 XDG_SESSION_ID=32 XDG_RUNTIME_DIR=/run/user/0 LANG=en_US.UTF-8 | |
5319 ps axeww -o pid -o command XDG_SESSION_ID=32 SHELL=/bin/bash SSH_CLIENT=35.231.34.153 44914 22 USER=root MAIL=/var/mail/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/root LANG=en_US.UTF-8 SHLVL=1 HOME=/root LOGNAME=root SSH_CONNECTION=35.231.34.153 44914 10.142.15.239 22 XDG_RUNTIME_DIR=/run/user/0 _=/bin/ps | |
5244: checking | |
5244: still alive [0] | |
PID COMMAND | |
1 /sbin/init HOME=/ init=/sbin/init NETWORK_SKIP_ENSLAVED= recovery= TERM=linux drop_caps= BOOT_IMAGE=/boot/vmlinuz-4.15.0-1026-gcp PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/ rootmnt=/root | |
2 [kthreadd] | |
3 [kworker/0:0] | |
4 [kworker/0:0H] | |
5 [kworker/u8:0] | |
6 [mm_percpu_wq] | |
7 [ksoftirqd/0] | |
8 [rcu_sched] | |
9 [rcu_bh] | |
10 [migration/0] | |
11 [watchdog/0] | |
12 [cpuhp/0] | |
13 [cpuhp/1] | |
14 [watchdog/1] | |
15 [migration/1] | |
16 [ksoftirqd/1] | |
17 [kworker/1:0] | |
18 [kworker/1:0H] | |
19 [cpuhp/2] | |
20 [watchdog/2] | |
21 [migration/2] | |
22 [ksoftirqd/2] | |
23 [kworker/2:0] | |
24 [kworker/2:0H] | |
25 [cpuhp/3] | |
26 [watchdog/3] | |
27 [migration/3] | |
28 [ksoftirqd/3] | |
29 [kworker/3:0] | |
30 [kworker/3:0H] | |
31 [kdevtmpfs] | |
32 [netns] | |
33 [rcu_tasks_kthre] | |
34 [kauditd] | |
35 [kworker/0:1] | |
36 [kworker/1:1] | |
37 [kworker/2:1] | |
38 [khungtaskd] | |
39 [oom_reaper] | |
40 [writeback] | |
41 [kcompactd0] | |
42 [ksmd] | |
43 [khugepaged] | |
44 [crypto] | |
45 [kintegrityd] | |
46 [kblockd] | |
47 [ata_sff] | |
48 [md] | |
49 [edac-poller] | |
50 [devfreq_wq] | |
51 [watchdogd] | |
52 [kworker/u8:1] | |
54 [kswapd0] | |
55 [ecryptfs-kthrea] | |
97 [kthrotld] | |
98 [acpi_thermal_pm] | |
99 [scsi_eh_0] | |
100 [scsi_tmf_0] | |
101 [scsi_eh_1] | |
102 [scsi_tmf_1] | |
103 [kworker/3:1] | |
104 [kworker/u8:2] | |
105 [kworker/u8:3] | |
109 [kworker/3:2] | |
110 [ipv6_addrconf] | |
119 [kstrp] | |
136 [charger_manager] | |
137 [kworker/0:1H] | |
228 [kworker/1:2] | |
232 [kworker/u8:4] | |
305 [raid5wq] | |
354 [kworker/1:1H] | |
355 [jbd2/sda1-8] | |
356 [ext4-rsv-conver] | |
369 [kworker/3:1H] | |
404 [kworker/2:1H] | |
418 [iscsi_eh] | |
421 [kworker/2:2] | |
424 [ib-comp-wq] | |
425 [ib_mcast] | |
426 [ib_nl_sa_wq] | |
427 [rdma_cm] | |
438 /lib/systemd/systemd-journald PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=438 LISTEN_FDS=4 LISTEN_FDNAMES=systemd-journald.socket:systemd-journald.socket:systemd-journald-dev-log.socket:systemd-journald-audit.socket | |
447 [kworker/0:2] | |
458 /sbin/lvmetad -f PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LISTEN_PID=458 LISTEN_FDS=1 LISTEN_FDNAMES=lvm2-lvmetad.socket SD_ACTIVATION=1 | |
485 /lib/systemd/systemd-udevd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=485 LISTEN_FDS=2 LISTEN_FDNAMES=systemd-udevd-control.socket:systemd-udevd-kernel.socket WATCHDOG_PID=485 WATCHDOG_USEC=180000000 | |
957 /sbin/dhclient -1 -v -pf /run/dhclient.ens5.pid -lf /var/lib/dhcp/dhclient.ens5.leases -I -df /var/lib/dhcp/dhclient6.ens5.leases ens5 IFUPDOWN_ens5=post-up METHOD=dhcp MODE=start LOGICAL=ens5 PHASE=post-up ADDRFAM=inet VERBOSITY=0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin IFACE=ens5 PWD=/ | |
1166 /sbin/iscsid PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1167 /sbin/iscsid PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1179 /usr/sbin/rsyslogd -n PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1179 LISTEN_FDS=1 LISTEN_FDNAMES=syslog.socket | |
1194 /usr/bin/lxcfs /var/lib/lxcfs/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1208 /usr/sbin/cron -f PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1219 /lib/systemd/systemd-logind PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify WATCHDOG_PID=1219 WATCHDOG_USEC=180000000 | |
1248 /usr/sbin/acpid PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1272 /usr/lib/snapd/snapd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1272 LISTEN_FDS=2 LISTEN_FDNAMES=snapd.socket:snapd.socket | |
1333 /usr/lib/accountsservice/accounts-daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1347 /usr/sbin/atd -f PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1402 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LISTEN_PID=1402 LISTEN_FDS=1 LISTEN_FDNAMES=dbus.socket | |
1460 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin _SYSTEMCTL_SKIP_REDIRECT=true PWD=/ | |
1481 /usr/lib/policykit-1/polkitd --no-debug PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1525 /sbin/agetty --noclear tty1 linux PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=linux LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= | |
1526 /sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt220 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=vt220 | |
1545 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /var/lib/ntp/ntp.conf.dhcp -u 112:116 PATH=/sbin:/bin:/usr/sbin:/usr/bin _SYSTEMCTL_SKIP_REDIRECT=true PWD=/ | |
1621 /usr/bin/python3 /usr/bin/google_network_daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1623 /usr/bin/python3 /usr/bin/google_accounts_daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1633 /usr/bin/python3 /usr/bin/google_clock_skew_daemon PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
1647 /usr/sbin/sshd -D PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify SSHD_OPTS= | |
2286 [jbd2/sdb-8] | |
2287 [ext4-rsv-conver] | |
2527 [kworker/3:3] | |
2586 [kworker/0:3] | |
2594 [kworker/1:3] | |
3889 [kworker/2:3] | |
4689 [kworker/0:4] | |
5169 /lib/systemd/systemd --user PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify HOME=/root LOGNAME=root USER=root SHELL=/bin/sh XDG_RUNTIME_DIR=/run/user/0 | |
5170 (sd-pam) HOME=/ init=/sbin/init NETWORK_SKIP_ENSLAVED= recovery= TERM=linux drop_caps= BOOT_IMAGE=/boot/vmlinuz-4.15.0-1026-gcp PATH=/sbin:/usr/sbin:/bin:/usr/bin PWD=/ rootmnt=/root | |
5244 [cockroach] <defunct> | |
5271 sshd: root@notty = | |
5314 bash -c mkdir -p logs echo ">>> roachprod stop: $(date)" >> ${HOME}/logs/roachprod.log ps axeww -o pid -o command >> ${HOME}/logs/roachprod.log pids=$(ps axeww -o pid -o command | \ sed 's/export ROACHPROD=//g' | \ awk '/ROACHPROD=(4)[ \/]/ { print $1 }') if [ -n "${pids}" ]; then kill -9 ${pids} for pid in ${pids}; do echo "${pid}: checking" >> ${HOME}/logs/roachprod.log while kill -0 ${pid}; do kill -0 ${pid} >> ${HOME}/logs/roachprod.log 2>&1 echo "${pid}: still alive [$?]" >> ${HOME}/logs/roachprod.log ps axeww -o pid -o command >> ${HOME}/logs/roachprod.log sleep 1 done echo "${pid}: dead" >> ${HOME}/logs/roachprod.log done fi USER=root LOGNAME=root HOME=/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games MAIL=/var/mail/root SHELL=/bin/bash SSH_CLIENT=35.231.34.153 44914 22 SSH_CONNECTION=35.231.34.153 44914 10.142.15.239 22 XDG_SESSION_ID=32 XDG_RUNTIME_DIR=/run/user/0 LANG=en_US.UTF-8 | |
5324 ps axeww -o pid -o command XDG_SESSION_ID=32 SHELL=/bin/bash SSH_CLIENT=35.231.34.153 44914 22 USER=root MAIL=/var/mail/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PWD=/root LANG=en_US.UTF-8 SHLVL=1 HOME=/root LOGNAME=root SSH_CONNECTION=35.231.34.153 44914 10.142.15.239 22 XDG_RUNTIME_DIR=/run/user/0 _=/bin/ps | |
5244: dead |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment