- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- IOCTL & PDC calls
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-09-2002 05:02 AM
10-09-2002 05:02 AM
IOCTL & PDC calls
I tried doing some ioctl calls on /dev/diag/diag2 but so far with no success. Any help and example source code would be welcome.
Regards, Andrej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2002 05:10 AM
10-09-2002 05:10 AM
Re: IOCTL & PDC calls
I'm no C guru, so I can't help you there ... but a lot of the things you need can be gotten in scripts :
# 32 of 64 bit kernel ...
getconf KERNEL_BITS
64
echo physmem/D | adb -k /stand/vmunix /dev/kmem
physmem:
physmem: 24576
for HP-UX 11.x systems running on 32 bit architecture:
example:
echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem
phys_mem_pages:
phys_mem_pages: 24576
for HP-UX 11.x systems running on 64 bit architecture:
example:
echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem | tail -1 | awk '$2 > 0 {print $2 /256}'
phys_mem_pages:
phys_mem_pages: 262144
The results of these commands are in memory pages, multiply by 4096
to obtain the size in bytes.
To determine the amount of lockable memory:
example:
echo total_lockable_mem/D | adb -k /stand/vmunix /dev/mem
total_lockable_mem:
total_lockable_mem: 185280
To determine the number of free swap pages :
example:
echo swapspc_cnt/D | adb -k /stand/vmunix /dev/kmem
swapspc_cnt:
swapspc_cnt: 216447
This will display the number of free swap pages.
Multiply the number returned by 4096 for the number of free swap bytes.
To determine the processor speed:
example:
echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
itick_per_usec:
itick_per_usec: 360
To determine the number of processors in use:
example:
echo "runningprocs/D" | adb -k /stand/vmunix /dev/mem
runningprocs:
runningprocs: 2
To determine the number of pages of buffer cache ( 4Kb in size)
example:
echo bufpages/D | adb -k /stand/vmunix /dev/mem
bufpages:
bufpages: 18848
To display kernel parameters using adb use the parameter name :
example:
echo nproc/D | adb -k /stand/vmunix /dev/mem
nproc:
nproc: 276
To determine the kernel your booted from:
example:
10.x
echo 'boot_string/S' | adb /stand/vmunix /dev/mem
boot_string:
boot_string: disc(52.6.0;0)/stand/vmunix
11.x
echo 'boot_string/S' | adb64 -k /stand/vmunix /dev/mem
boot_string:
boot_string: disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix
You can off course also execute cstm in batch ... for example :
echo "selclass qualifier cpu;info;wait;infolog" | cstm > /tmp/procinfo
Hope this helps,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2002 05:40 AM
10-09-2002 05:40 AM
Re: IOCTL & PDC calls
I cannot use stm because it's not part of HP-UX system. (not included in default installation) and it wouldn't work for most users who install our application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2002 11:21 PM
10-09-2002 11:21 PM
Re: IOCTL & PDC calls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2002 02:29 AM
10-10-2002 02:29 AM
Re: IOCTL & PDC calls
Information regarding this can be extracted in C using the pstat library:
/* mem.c
Program to list physical memory */
#include
main()
{
struct pst_static buf;
pstat_getstatic(&buf, sizeof(buf), 0, 0);
printf("Physical memory = %ld MB\n", buf.physical_memory/256);
exit(0);
}
Compile the program by typing:
cc mem.c -o mem
If you program regularly, you will find the man page on pstat useful.
Cheers,
Joseph.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2002 05:23 AM
10-11-2002 05:23 AM
Re: IOCTL & PDC calls
How to get motherboard information? Memory sockets? PCI devices? Temparatures? Fan Speeds?