X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fps-ceph.pl;fp=src%2Fceph%2Fsrc%2Fps-ceph.pl;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=3b6a0fe28e402cb37e02a266a558d34b86971664;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/ps-ceph.pl b/src/ceph/src/ps-ceph.pl deleted file mode 100755 index 3b6a0fe..0000000 --- a/src/ceph/src/ps-ceph.pl +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/perl -use strict; - -# -# ps-ceph.pl: Displays a list of ceph processes running locally -# -# Copyright (C) 2010, Dreamhost -# -# This is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License version 2.1, as published by the Free Software -# Foundation. See file COPYING. -# - -sub is_ceph_proc { - my $cmdline = @_[0]; - return 0 if $cmdline =~ /\bps-ceph.pl\b/; - - return 1 if $cmdline =~ /\bceph\b/; - return 1 if $cmdline =~ /\bceph-fuse\b/; - return 1 if $cmdline =~ /\brbd-nbd\b/; - return 1 if $cmdline =~ /\brbd-fuse\b/; - return 1 if $cmdline =~ /\bceph-mds\b/; - return 1 if $cmdline =~ /\bceph-mon\b/; - return 1 if $cmdline =~ /\bceph-osd\b/; - return 1 if $cmdline =~ /\bceph-mgr\b/; - return 1 if $cmdline =~ /\bceph-disk\b/; - return 1 if $cmdline =~ /\brbd-mirror\b/; - return 1 if $cmdline =~ /\bradosgw\b/; - return 1 if $cmdline =~ /\bosdmaptool\b/; - return 1 if $cmdline =~ /\brados\b/; - return 1 if $cmdline =~ /test_/; - return 1 if $cmdline =~ /\bvstart.sh\b/; - - return 0; -} - -opendir PROC, "/proc"; -while(my $pid = readdir PROC) { - next if $pid =~ /\D/; # not a pid - next if !-o "/proc/$pid"; # not ours - open CMDLINE, "/proc/$pid/cmdline" or next; - my $cmdline = ; - $cmdline =~ s/[^\x20-\x7e]/ /g; - close CMDLINE; - if (is_ceph_proc($cmdline)) { - print "$pid\t$cmdline\n"; - } -}