path: ceph_18.2.7+ds-1.1/src/init-radosgw daemon_is_running() { daemon=$1 if pidof $daemon >/dev/null; then echo "$daemon is running." exit 0 path: ceph_18.2.7+ds-1.1/src/init-radosgw else killproc $RADOSGW while pidof $RADOSGW >/dev/null && [ $timeout -gt 0 ] ; do sleep 1 timeout=$(($timeout - 1)) path: ceph_18.2.7+ds-1.1/src/seastar/dpdk/doc/guides/sample_app_ug/kernel_nic_interface.rst # Print statistics # kill -SIGUSR1 `pidof kni` # Zero statistics path: ceph_18.2.7+ds-1.1/src/seastar/dpdk/doc/guides/sample_app_ug/kernel_nic_interface.rst # Zero statistics # kill -SIGUSR2 `pidof kni` Dump network traffic: path: ceph_18.2.7+ds-1.1/src/rocksdb/tools/regression_test.sh # But first, make best effort to kill any db_bench that have run for more # than 12 hours, as that indicates a hung or runaway process. kill_old_cmd='for PID in $(pidof db_bench); do [ "$(($(stat -c %Y /proc/$PID) + 43200))" -lt "$(date +%s)" ] && echo "Killing old db_bench $PID" && kill $PID && sleep 5 && kill -9 $PID && sleep 5; done; pidof --version > /dev/null' if ! [ -z "$REMOTE_USER_AT_HOST" ]; then pids_cmd="$SSH $REMOTE_USER_AT_HOST '$pids_cmd'" path: ceph_18.2.7+ds-1.1/src/rocksdb/tools/regression_test.sh # $5 --- update_report. Default: 1 function run_db_bench { # Make sure no other db_bench is running. (Make sure command succeeds if pidof # command exists but finds nothing.) pids_cmd='pidof db_bench || pidof --version > /dev/null' path: ceph_18.2.7+ds-1.1/src/rocksdb/tools/regression_test.sh # Make sure no other db_bench is running. (Make sure command succeeds if pidof # command exists but finds nothing.) pids_cmd='pidof db_bench || pidof --version > /dev/null' # But first, make best effort to kill any db_bench that have run for more # than 12 hours, as that indicates a hung or runaway process. path: ceph_18.2.7+ds-1.1/doc/changelog/v0.80.6.txt Check for systemd running on PID 1. If it is then start the daemon using: systemd-run -r . pidof returns null as it is executed too quickly, adding one second of sleep and script reports startup correctly. path: ceph_18.2.7+ds-1.1/qa/client/gen-1774.sh sysvinit-pidof.control sysvinit-pidof.list sysvinit-pidof.postinst sysvinit-pidof.prerm sysvinit.postinst path: ceph_18.2.7+ds-1.1/qa/client/gen-1774.sh sysvinit.list sysvinit-pidof.control sysvinit-pidof.list sysvinit-pidof.postinst sysvinit-pidof.prerm path: ceph_18.2.7+ds-1.1/qa/client/gen-1774.sh sysvinit-pidof.list sysvinit-pidof.postinst sysvinit-pidof.prerm sysvinit.postinst sysvinit.postrm path: ceph_18.2.7+ds-1.1/qa/client/gen-1774.sh sysvinit-inittab.list sysvinit.list sysvinit-pidof.control sysvinit-pidof.list sysvinit-pidof.postinst path: ceph_18.2.7+ds-1.1/doc/dev/perf.rst Top:: sudo perf top -p `pidof ceph-osd` To capture some data with call graphs:: path: ceph_18.2.7+ds-1.1/doc/dev/perf.rst Run ceph, then record some perf data:: sudo perf record -p `pidof ceph-osd` -F 99 --call-graph dwarf -- sleep 60 Then generate the flamegraph:: path: ceph_18.2.7+ds-1.1/doc/dev/perf.rst To capture some data with call graphs:: sudo perf record -p `pidof ceph-osd` -F 99 --call-graph dwarf -- sleep 60 To view by caller (where you can see what each top function calls):: path: ceph_18.2.7+ds-1.1/qa/workunits/cephadm/test_cephadm.sh $CEPHADM enter --fsid $FSID --name mon.a -- pidof ceph-mon expect_false $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mon $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mgr # this triggers a bug in older versions of podman, including 18.04's 1.6.2 #expect_false $CEPHADM --timeout 5 enter --fsid $FSID --name mon.a -- sleep 30 path: ceph_18.2.7+ds-1.1/qa/workunits/cephadm/test_cephadm.sh $CEPHADM enter --fsid $FSID --name mon.a -- test -d /var/lib/ceph/mon/ceph-a $CEPHADM enter --fsid $FSID --name mgr.x -- test -d /var/lib/ceph/mgr/ceph-x $CEPHADM enter --fsid $FSID --name mon.a -- pidof ceph-mon expect_false $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mon $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mgr path: ceph_18.2.7+ds-1.1/qa/workunits/cephadm/test_cephadm.sh $CEPHADM enter --fsid $FSID --name mgr.x -- test -d /var/lib/ceph/mgr/ceph-x $CEPHADM enter --fsid $FSID --name mon.a -- pidof ceph-mon expect_false $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mon $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mgr # this triggers a bug in older versions of podman, including 18.04's 1.6.2