git://git.onelab.eu
/
vsys-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4232e4a
)
(no commit message)
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Thu, 7 May 2009 14:50:15 +0000
(14:50 +0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Thu, 7 May 2009 14:50:15 +0000
(14:50 +0000)
exec/goodfences
[new file with mode: 0755]
patch
|
blob
diff --git a/exec/goodfences
b/exec/goodfences
new file mode 100755
(executable)
index 0000000..
a07a427
--- /dev/null
+++ b/
exec/goodfences
@@ -0,0
+1,31
@@
+#!/usr/bin/perl
+
+use strict;
+
+$|=1;
+
+my $slicename;
+my $portnumber;
+
+
+$slicename = $ARGV[0];
+$portnumber = <STDIN>;
+
+chop($portnumber);
+
+if ($portnumber!~/^\d+$/) {
+ die("$portnumber is not a port number");
+}
+
+open CMD,"/sbin/fuser -n tcp $portnumber 2>&1|";
+
+$_ = <CMD>;
+
+my @ports;
+@ports=split;
+
+if ($#ports > 0) {
+ system("cat /proc/$ports[1]/vinfo");
+}
+
+close CMD;