its been a while since i've worked on this
and it seems there were many changes left uncommitted. i have no idea what state this is in but we will refactor or start over from this point.
This commit is contained in:
19
files/lxcmon.pl
Executable file
19
files/lxcmon.pl
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
|
||||
# > ls /var/lib/lxc
|
||||
# cnode1/ cnode2/ cnode3/ cnode4/ cnode5/
|
||||
|
||||
my @nodes = `ls /var/lib/lxc`;
|
||||
|
||||
for (@nodes)
|
||||
{
|
||||
chomp $_;
|
||||
|
||||
my $mac = `grep hwaddr /var/lib/lxc/$_/config|grep -v '#'`;
|
||||
$mac =~ s/.*?=\s+(.*?)/$1/;
|
||||
|
||||
print `lxc-info -n $_`;
|
||||
print "MAC Addr:\t$mac\n";
|
||||
}
|
Reference in New Issue
Block a user