- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need actual output of vecheck command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 04:46 AM
04-01-2009 04:46 AM
I need the actual output of the vecheck command used to identify if a system is vPar or not. Can someone please paste it here??
Thanks,
Vineet
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 04:52 AM
04-01-2009 04:52 AM
Re: Need actual output of vecheck command
vecheck(1):
DESCRIPTION
The vecheck command uses its exit status to report whether or not the
command has been run in a virtual partition (vPars) environment. The
result can be used to alter command flow in a script.
...
RETURN VALUE
The vecheck command exits with one of the following values:
0 The command is run in a vPars environment.
255 The command is run in a non-vPars environment.
it will print nothing to the screen, you need to read the return value.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 05:15 AM
04-01-2009 05:15 AM
Re: Need actual output of vecheck command
Thanks a lot. But if you/anyone do have a vPar setup can you check the output of this command:-
vparstatus -w -M
/sbin/vecheck 1>/dev/null ; echo $?
Thanks,
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 05:21 AM
04-01-2009 05:21 AM
Re: Need actual output of vecheck command
But the echo $? should return either 0 or 255, the other command returns this:
# vparstatus -w
The current virtual partition is myvpar01.
According to the man page
"...
-M Displays attribute and resource information in a machine-
readable format, or restricts output of the -w option to
the name of the local virtual partition.
..."
the result of the following must be the vPar name only
# vparstatus -w -M
myvpar01
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 05:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 05:52 AM
04-01-2009 05:52 AM
Re: Need actual output of vecheck command
Thanks a lot for the info. I have 2 questions more for you:-
1) Did you execute the command with superuser or normal?
2) What is the output of the command: /sbin/vecheck
Thanks,
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 05:58 AM
04-01-2009 05:58 AM
Re: Need actual output of vecheck command
If you read the man page excerpt posted by Torsten it says basically that there is no output generated by vecheck.
You have to look at the exit code to determine whether it's a VPAR or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 06:03 AM
04-01-2009 06:03 AM
Re: Need actual output of vecheck command
/sbin/vecheck ; echo $?
EXAMPLES
In a vPars environment:
vecheck
echo $?
0
In a non-vPars environment:
vecheck
echo $?
255
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 06:04 AM
04-01-2009 06:04 AM
Re: Need actual output of vecheck command
I am aware that vparstatus can be executed only by superuser. Does vecheck require superuser or will normal user also be able to execute that command?
Thanks,
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 06:15 AM
04-01-2009 06:15 AM
Re: Need actual output of vecheck command
But that is not what you asked! You asked **HOW** Daniel executed the commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 06:28 AM
04-01-2009 06:28 AM
Re: Need actual output of vecheck command
I apologize. I asked the wrong question. The correct question is:-
Does vecheck require superuser or can a normal user execute the command?
Thanks,
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 06:39 AM
04-01-2009 06:39 AM
Re: Need actual output of vecheck command
Normal user can execute the command. It has execute permission to everyone.
# ll /sbin/vecheck
-r-xr-xr-x 1 bin bin 15648 Oct 8 2003 /sbin/vecheck
#
It is working as normal user also. see below
$ /sbin/vecheck >/dev/null ; echo $?
0
$
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2009 06:50 AM
04-01-2009 06:50 AM
Re: Need actual output of vecheck command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2009 04:29 AM
04-02-2009 04:29 AM
Re: Need actual output of vecheck command
Can you please run this command on any vPar and let me know the output of the same?
/sbin/vecheck >/dev/null 2>/dev/null ; echo $? | grep "0" 2>/dev/null
Thanks a lot,
Vineet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2009 10:37 AM
04-03-2009 10:37 AM
Re: Need actual output of vecheck command
#/sbin/vecheck >/dev/null 2>/dev/null ; echo $? | grep "0" 2>/dev/null
0
though if you're fiddling with some shell script i would recommend you the following:
#!/usr/bin/ksh
/sbin/vecheck
if [ $? -eq ]
then
echo "vPar environment detected!"
else
echo "This is not a virtual partition."
fi
Unix operates with beer.