Added CPU socket count to hello perl example. Also tweaked
command line argmument handling section to match output of python example script.
This commit is contained in:
parent
2d6766f0bb
commit
2542c6b1c3
1 changed files with 9 additions and 4 deletions
|
|
@ -14,10 +14,15 @@ my $verinfo = `git describe --abbrev=7 --dirty --always --tags`;
|
||||||
print "Hello Perl World! Version: $verinfo\n";
|
print "Hello Perl World! Version: $verinfo\n";
|
||||||
|
|
||||||
# Show list of command line arguments
|
# Show list of command line arguments
|
||||||
print "Command line args: @ARGV\n";
|
print "Command line args: ";
|
||||||
print "ARGV[0] = $ARGV[0]";
|
foreach (@ARGV) {
|
||||||
print "ARGV[1] = $ARGV[1]";
|
print " $_";
|
||||||
print "ARGV[2] = $ARGV[2]";
|
}
|
||||||
|
print "\n";
|
||||||
|
|
||||||
|
# Determine number of physical CPU sockets
|
||||||
|
my $socketcount=`cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l`;
|
||||||
|
print "CPU socket count: $socketcount\n";
|
||||||
|
|
||||||
# print out our animals array in reverse-sorted order
|
# print out our animals array in reverse-sorted order
|
||||||
print "\nValue of animals array:\n";
|
print "\nValue of animals array:\n";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue