02-06-2014
Quote:
Originally Posted by
bartus11
What kind of virtualization are we talking here?
I want perl module name which can tell me whether my server is physical or virtual.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Is there a command I can use to find out how many CPU's and what type are on my server? (I was told to use cat /proc/cpuinfo)
Also, how do I know what kind of bus speeds are on my server?
Thanks in advance:) (3 Replies)
Discussion started by: ihot
3 Replies
2. HP-UX
is there a single command or location from which one can get information like cpu Mhz,cpu cache...etc in HP UX:) (1 Reply)
Discussion started by: vijayca
1 Replies
3. Gentoo
well. the title says it all.
im runing top in batch mode like this
top -b -n1 > somefile
but the cpu usage info is not correct.
if i run top normally, the first second, i see the same wrong info, and then it corrects itself.
i found only one small mention of it on this forum. with this link... (7 Replies)
Discussion started by: broli
7 Replies
4. AIX
Hi,
may be this is an AIX noob question:
my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (5 Replies)
Discussion started by: DarthVader77
5 Replies
5. HP-UX
Hi,
I am going to buy a software that is licenced per CORE.
I have a HPUX B1123 64 bit with 8 cpus.
How can i know how many cores are in my machine ?
Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies
6. Shell Programming and Scripting
Dear all,
Is there any generic command working on all Unix listing the CPU of a server?
I found different command line per OS but I am looking for a more generic one.
Thanks for your answer. (5 Replies)
Discussion started by: sgoiffon
5 Replies
7. Shell Programming and Scripting
I am doing some bespoke nagios plugins.
can anyone recommend any good perl modules
for system checks.
disks, memory, processes, load avgs, networks, etc etc. everything basically.
they will need to perform on bsd, aix, solaris, linux.
any recommendations? (2 Replies)
Discussion started by: bigearsbilly
2 Replies
8. UNIX for Dummies Questions & Answers
I have searched and searched this topic but without looking at source code ; my next step maybe , I find the same ambiguous information.
My main question is how is the target code translated? It is stated that there are variables created that hold the data that the emulated CPU would hold in... (12 Replies)
Discussion started by: theKbStockpiler
12 Replies
9. AIX
To get only the cpu info from the topas command terminal.
CPU User% Kern% Wait% Idle% Physc Entc
ALL 2.3 4.4 0.0 93.3 0.07 7.7
I tried some thing like this but did not work
topas << done
grep "ALL"
q
done
Can someone help me in this. (5 Replies)
Discussion started by: rpm120
5 Replies
10. UNIX for Dummies Questions & Answers
Hello all
i did search the web and found allot of answers but im confused
what are the best ways to get this info via Linux default commands
1. current Cpu Usage in Percent
2. current Memory Usage In Bytes
3. current Memory Available In Bytes
Thanks! (2 Replies)
Discussion started by: umen
2 Replies
LEARN ABOUT CENTOS
shell-quote
SHELL-QUOTE(1) User Contributed Perl Documentation SHELL-QUOTE(1)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.16.3 2010-06-11 SHELL-QUOTE(1)