- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- porting Solaris app to HPUX
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
Discussions
Discussions
Forums
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
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
тАО06-07-2006 01:42 PM
тАО06-07-2006 01:42 PM
porting Solaris app to HPUX
Can anybody help for my porting issue? I am working on porting our application to HPUX 11i environment.
But I could not find correspondent syscall for Solaris kstat structure.
Here are some scenarios:
1. Network:
get network input trafifc:
ksname = (kstat_named_t *) kstat_data_lookup(ksp, "rbytes");
get network output traffic:
ksname = (kstat_named_t *) kstat_data_lookup(ksp, "obytes");
snap time:
newhrtime = ksp->ks_snaptime;
2. CPU:
collect CPU usages:
....//ksp come from kstat structure in Solaris
for ( ksp = kstatControlPtr->kc_chain; ksp; ksp = ksp->ks_next )
{
if ( strncmp(ksp->ks_name, "cpu_stat", 8 ) == 0 ) {
if ( kstat_read(kstatControlPtr, ksp, NULL) == -1 )
{
// Error....
}
memcpy(&cpu_stats[j], ksp->ks_data, sizeof(cpu_stats[j]));
j++;
}
....//we got cpu_stats array.
}
.....
/* Calculate CPU load distribution in idle, user and system states */
for ( int i = 0; i < ncpus && i < noofCpus; i++ )
{
newCpuIdleTimeCounter[i] = cpu_stats[i].cpu_sysinfo.cpu[CPU_IDLE];
newCpuUserTimeCounter[i] = cpu_stats[i].cpu_sysinfo.cpu[CPU_USER];
newCpuKernelTimeCounter[i] = cpu_stats[i].cpu_sysinfo.cpu[CPU_KERNEL];
newCpuWaitTimeCounter[i] = cpu_stats[i].cpu_sysinfo.cpu[CPU_WAIT];
.....
How do I use HPUX call to achieve same functionality?
- Tags:
- solaris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2006 02:16 PM
тАО06-07-2006 02:16 PM
Re: porting Solaris app to HPUX
- Tags:
- pstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2006 06:12 PM
тАО06-07-2006 06:12 PM
Re: porting Solaris app to HPUX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2006 08:19 PM
тАО06-07-2006 08:19 PM
Re: porting Solaris app to HPUX
this will not help very much, but from another thread:
"Sadly HP-UX hides this data and requires you to buy e.g. Glance to access the data.
Nevertheless you can use plug-ins based on common user space Unix commands such as
uptime, ps, vmstat, iostat, sar, nfsstat etc."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 12:28 PM
тАО06-08-2006 12:28 PM
Re: porting Solaris app to HPUX
Take a look at the manual in docs.hp.com for DLPI - IIRC there is a stats message one could send to each driver to get their (link-level) stats which I suspect would match those from the lanadmin -g mibstats
You might also go poking about in /usr/include, but keep in mind that not everything one finds there is documented and so you may be on your own.
The DSPP - http://devresource.hp.com/ might be a good place to look.
BTW, wrt the CPU stats you get from kstat on solaris - they do _not_ include time spent processing interrupts. I found this the hard way porting netperf. Time spent processing interrupts is tracked independent of user/sys/idle. In http://www.netperf.org/svn/neperf2/src/netcpu_kstat10.c (IIRC that is the file) you can see the handwaving I had to do for that.
To see what I mean, run something interrupt intensive like netperf and bind the netperf or the netserver (depending on which way you are testing) to a CPU other than the one taking interrupts from the NIC. Run mpstat while netperf is running. Many's the time you will see (generally when the system is otherwise idle) the CPU taking interrups having its interrupt count quite large but still reporting 100% idle CPU.
Feel free to peruse the other netcpu files there for ideas for say HP-UX 11.23. Netperf though, strange as it may seem, does not try to extract networking stats from the system :)