11-29-2007
HP-UX system information
Hi,
I'm writing a script to display a lot of information which describe a server (OS distrib, release, Hardware platform, CPU, HD, S/N...).
For Linux side it is ok as you have almost all the information in /proc/cpuinfo, /proc/meminfo... and you can use dmidecode but for HP-UX I didn't find such files and command.
Could you please help me?
Best regards
biker007fr
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm just getting started with unix and would like to know 1) how to tell how big the harddrive is 2) how to tell if there are multiple harddrive installed on the machine 3) a relitavely easy way to tell what programs are installed on the machine.
I'm using Sun OS 5.6
Thanks (3 Replies)
Discussion started by: ViperD
3 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am new to Unix and am working on AIX ( rs6000 ). I am looking for the system info of the unix box like
1. Number of CPUs
2. CPU speed
3. RAM size
Your help is much appreciated
Thanks
rao. (6 Replies)
Discussion started by: rao
6 Replies
3. HP-UX
How do I get the system information on a HP UNIX server. details like CPU speed, number of processors etc. (4 Replies)
Discussion started by: Olamide
4 Replies
4. Shell Programming and Scripting
hi
I am new to this forum. hope to get help from u all.
how can i write these by using shell programming?
1. The name of the machine and the date/time at which the report was produced.
2. Licensing information such as the operating system revision level and license restrictions in terms of... (1 Reply)
Discussion started by: nokia1100
1 Replies
5. Shell Programming and Scripting
Hey,
I am after the commands to get the following information for my Unix system:
default visual editor (i dont even know where to start with this one)
default window manager (this one either, no idea)
total quota (just the size, none of the other data. I've narrowed it down to quota -sv)... (1 Reply)
Discussion started by: bonjour
1 Replies
6. AIX
Hi,
How to get the AIX system hardware and software basic information using terminal command with guest login?
Here below i have specified some of the information i need. Please have a look at this and guide me.
OS Name:
OS Version :
OS Manufacturer:
OS Configuration:
... (4 Replies)
Discussion started by: forumguest
4 Replies
7. Infrastructure Monitoring
Hi,
How to get the Linux system hardware and software basic information using terminal command ?
Here below i have specified some of the information i need. Please have a look at this and guide me.
OS Name:
OS Version :
OS Manufacturer:
OS Configuration:
OS Build Type:... (6 Replies)
Discussion started by: forumguest
6 Replies
8. Solaris
Hi,
How to get the Solaris system hardware and software basic information using terminal command with guest login?
Here below i have specified some of the information i need. Please have a look at this and guide me.
OS Name:
OS Version :
OS Manufacturer:
OS Configuration:
... (15 Replies)
Discussion started by: forumguest
15 Replies
9. BSD
Hi,
How to get the FreeBsd system hardware and software basic information using terminal command with guest login?
Here below i have specified some of the information i need. Please have a look at this and guide me.
OS Name:
OS Version :
OS Manufacturer:
OS... (2 Replies)
Discussion started by: forumguest
2 Replies
10. AIX
Hi all,
I have googled around quite a bit and tried many different commands to get system information about my AIX 5.3 box but none of the commands I've used have given me quite what I'm looking for. I am interested in finding out the model of the motherboard, and amount of available RAM, the... (2 Replies)
Discussion started by: ThePistonDoctor
2 Replies
LEARN ABOUT OSX
data::dumper::concise::sugar
Data::Dumper::Concise::Sugar(3) User Contributed Perl Documentation Data::Dumper::Concise::Sugar(3)
NAME
Data::Dumper::Concise::Sugar - return Dwarn @return_value
SYNOPSIS
use Data::Dumper::Concise::Sugar;
return Dwarn some_call(...)
is equivalent to:
use Data::Dumper::Concise;
if (wantarray) {
my @return = some_call(...);
warn Dumper(@return);
return @return;
} else {
my $return = some_call(...);
warn Dumper($return);
return $return;
}
but shorter. If you need to force scalar context on the value,
use Data::Dumper::Concise::Sugar;
return DwarnS some_call(...)
is equivalent to:
use Data::Dumper::Concise;
my $return = some_call(...);
warn Dumper($return);
return $return;
If you need to force list context on the value,
use Data::Dumper::Concise::Sugar;
return DwarnL some_call(...)
is equivalent to:
use Data::Dumper::Concise;
my @return = some_call(...);
warn Dumper(@return);
return @return;
If you want to label your output, try DwarnN
use Data::Dumper::Concise::Sugar;
return DwarnN $foo
is equivalent to:
use Data::Dumper::Concise;
my @return = some_call(...);
warn '$foo => ' . Dumper(@return);
return @return;
If you want to output a reference returned by a method easily, try $Dwarn
$foo->bar->{baz}->$Dwarn
is equivalent to:
my $return = $foo->bar->{baz};
warn Dumper($return);
return $return;
If you want to format the output of your data structures, try DwarnF
my ($a, $c) = DwarnF { "awesome: $_[0] not awesome: $_[1]" } $awesome, $cheesy;
is equivalent to:
my @return = ($awesome, $cheesy);
warn DumperF { "awesome: $_[0] not awesome: $_[1]" } $awesome, $cheesy;
return @return;
If you want to immediately die after outputting the data structure, every Dwarn subroutine has a paired Ddie version, so just replace the
warn with die. For example:
DdieL 'foo', { bar => 'baz' };
DESCRIPTION
use Data::Dumper::Concise::Sugar;
will import Dwarn, $Dwarn, DwarnL, DwarnN, and DwarnS into your namespace. Using Exporter, so see its docs for ways to make it do something
else.
Dwarn
sub Dwarn { return DwarnL(@_) if wantarray; DwarnS($_[0]) }
$Dwarn
$Dwarn = &Dwarn
$DwarnN
$DwarnN = &DwarnN
DwarnL
sub Dwarn { warn Data::Dumper::Concise::Dumper @_; @_ }
DwarnS
sub DwarnS ($) { warn Data::Dumper::Concise::Dumper $_[0]; $_[0] }
DwarnN
sub DwarnN { warn '$argname => ' . Data::Dumper::Concise::Dumper $_[0]; $_[0] }
Note: this requires Devel::ArgNames to be installed.
DwarnF
sub DwarnF (&@) { my $c = shift; warn &Data::Dumper::Concise::DumperF($c, @_); @_ }
TIPS AND TRICKS
global usage
Instead of always just doing:
use Data::Dumper::Concise::Sugar;
Dwarn ...
We tend to do:
perl -MData::Dumper::Concise::Sugar foo.pl
(and then in the perl code:)
::Dwarn ...
That way, if you leave them in and run without the "use Data::Dumper::Concise::Sugar" the program will fail to compile and you are less
likely to check it in by accident. Furthmore it allows that much less friction to add debug messages.
method chaining
One trick which is useful when doing method chaining is the following:
my $foo = Bar->new;
$foo->bar->baz->Data::Dumper::Concise::Sugar::DwarnS->biff;
which is the same as:
my $foo = Bar->new;
(DwarnS $foo->bar->baz)->biff;
SEE ALSO
You probably want Devel::Dwarn, it's the shorter name for this module.
perl v5.16.2 2011-01-20 Data::Dumper::Concise::Sugar(3)