Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Using Perl to detect RAM amount

by spartan (Pilgrim)
on Jan 07, 2004 at 19:32 UTC ( [id://319574]=note: print w/replies, xml ) Need Help??


in reply to Re: Using Perl to detect RAM amount
in thread Using Perl to detect RAM amount

This should work on all modern sparc platforms (sun4u mostly)
#!/usr/bin/perl -w use strict; chomp (my @data=`/usr/platform/\`uname -m\`/sbin/prtdiag`); foreach my $line (@data) { if ($line =~ /Mem/) { my @needed_line=(split /\s+/, $line); print "Memory = ".$needed_line[2]."\n"; } }


Very funny Scotty... Now PLEASE beam down my PANTS!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://319574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-20 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found