- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- swap info
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
10-03-2001 04:04 AM
10-03-2001 04:04 AM
The 'swapinfo' command needs privileged rights !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 04:13 AM
10-03-2001 04:13 AM
Re: swap info
The permissions on /usr/sbin/swapinfo are 544 but I dont see any reason why you couldnt make them 555. Its a binary so its safe, and its not suid to root so no security risk there.
Otherwise you could grep swap /etc/fstab - this should list the swap lvols (as long as /etc/fstab is uptodate), and then you can lvdisplay the size of these lvols - and add in the default swap on /dev/vg00/lvol2 (not usually listed in /etc/fstab).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 04:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 04:18 AM
10-03-2001 04:18 AM
Re: swap info
Size is given in blocks on the next line.
If you have additional swap, look at /etc/fstab to see how it is configured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 04:43 AM
10-03-2001 04:43 AM
Re: swap info
Some additional ranting...I don't understand why HP doesn't open up the permissions for some executables such as swapinfo and fuser, both of which can be safely run as non-root accounts. Just doesn't make sense?
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 05:11 AM
10-03-2001 05:11 AM
Re: swap info
"swapinfo" is your best bet, if you don't have glance installed on your system. If you have glance, once you run "glance" and then press "?" to bring the help menu up and you can see the different keys associated with different menus in glanceplus.
Change the permission of "swapinfo" if required.
If you don't have additional swap configured, then "lvdisplay /dev/vg00/lvol2" will show you the amount of swap on your system.
Check for any filesystem swap you might have. The entry for that would be in /etc/fstab.
Hope this helps.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 05:46 AM
10-03-2001 05:46 AM
Re: swap info
but I am not super-user on the system I want to check...
And I was looking for the default swap.
Thanks, Gideon. Why didn't I think about that ?
Wim : It works if you don't resize the swap. If you do, I don't know if you can trace it in the log file.
No glance for me...
marc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 05:59 AM
10-03-2001 05:59 AM
Re: swap info
Actual device swap can only be detected in /etc/mnttab, because /etc/fstab only contains device swap or filesystem swap that will be enabled on boot.
I don't know how you can see filesystem swap that will not be re-enabled on boot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2001 06:04 AM
10-03-2001 06:04 AM
Re: swap info
My first choice is to side with Stefan. I don't see any harm in adding execute permission to 'swapinfo'.
Here's a quick script that reports and totals the declared device swap. Remember that it doesn't count pseudo swap (it can't). Remember too, that primary device swap isn't declared in /etc/fstab -- to do so would generate an error at boot time when it's activation is attempted twice.
Here's the script:
#!/usr/bin/sh
typeset -i SZ=0
typeset -i MB=0
DEV=`awk '$3~/swap/ {print $1}' /etc/fstab`
for LV in /dev/vg00/lvol2 $DEV
do
SZ=`/usr/sbin/lvdisplay $LV|awk '/LV Size/ {print $4}'`
let MB=$MB+$SZ
echo "$LV = $SZ"
done
echo "Total Size (MB) = $MB"
exit 0
#.end.
Output might look like:
/dev/vg00/lvol2 = 512
/dev/vg00/lvol9 = 1024
Total Size (MB) = 1536
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 08:40 PM
04-15-2004 08:40 PM
Re: swap info
cd /tmp
cp /usr/sbin/swapinfo .
chmod 755 swapinfo
./swapinfo
- Ian