Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Using Perl to detect RAM amount

by spartan (Pilgrim)
on Jan 07, 2004 at 19:32 UTC ( #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? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2023-01-27 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?