- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: System call to make a TOC
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
11-22-2007 02:14 AM
11-22-2007 02:14 AM
Is there a system call available to invoke a TOC directly from a C program? I can't rely on doing a system() to run adb or some other hack. Of course, this wacky program would be run as root.
As to why I would be silly enough to want to do this, don't ask. :)
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2007 04:06 AM
11-22-2007 04:06 AM
Re: System call to make a TOC
I don't think there is any documented panic sys call..., but /usr/include/sys/kern_svcs.h lists panic as extern void panic __((const char *s));
but problem is we don't know which library has the code, so cannot compile it....
also the panic routine is there in kernel,you can check with nm /stand/vmunix and grep for panic ( there will be a lot) ...
but i don't know if its possible to extract that code and use it as a library. ...
I think someone with programming skills should be able to doit.
Regards,
RD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2007 04:41 AM
11-22-2007 04:41 AM
Re: System call to make a TOC
Why not? (Of course you have to know what hack to do?)
>rajdev: but problem is we don't know which library has the code, ...
Right.
>but i don't know if its possible to extract that code ... I think someone with programming skills should be able to do it.
It isn't that easy. A syscall would have to be added or a new driver, that would call panic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2007 04:54 AM
11-22-2007 04:54 AM
Re: System call to make a TOC
ServiceGuard can TOC a server without the need of any special driver, and it does not seem to modify the kernel upon installation so there is surely a way to do this -- question is, how.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2007 05:15 AM
11-22-2007 05:15 AM
Re: System call to make a TOC
You can TOC your server from the console.
To try and do it with software is dangerous and untested.
You really do want to go where no admin has come before.
Engage warp drive and don't try it on a production system.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2007 07:15 AM
11-22-2007 07:15 AM
SolutionThere is no public interface because there is no reliable way of TOC'ing a system from user space (TOC'ing a live system usually has to occur when the system is hung which means you probably won't be able to enter an OS command to do this)
>>ServiceGuard can TOC a server without the need of any special driver, and it does not seem to modify the kernel upon installation so there is surely a way to do this -- question is, how.
Actually Serviceguard does use a special driver - it's not installed with Serviceguard cos it already a core part of the OS that Serviceguard uses, and Serviceguard doesn't talk to the component of the kernel which manages the TOC process through system calls, but through unpublished ioctl's to the drivers device file. This is the same driver you use to talk to PDC/EFI when you run a setboot command.
And strictly speaking of course, Serviceguard doesn't actually TOC a system, it *stops it* from being TOC'd. Using the unpublished interface it sets a timer in the kernel, and updates it every time it gets a heartbeat. If the timer ever managed to count down to zero its the kernel that issues the TOC.
So the only way you could do this would be to write yourself an expect script which connected to your MP/GSP and issued a TC... which you may as well run manually anyway.
...and I am going to ask - why do you want to do this?
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2007 07:30 AM
11-22-2007 07:30 AM
Re: System call to make a TOC
Since someone asked... I boot on SAN and was looking into the possibility of writing a monitor that would have TOC'd my server should disk I/O become completely hung due to a problem on the fabric. My guess is the EMS HA monitor hangs as well in this situation (didn't try it) so it would not be of any help. Invoking reboot() probably won't work either in that scenario.
Thanks to all of you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2007 11:41 PM
11-26-2007 11:41 PM
Re: System call to make a TOC
Talking to a colleague, they had this working in a Serviceguard cluster by using EMS monitors (lv_summary or pv_summary) combined with the NODE_FAIL_FAST_ENABLED=YES.
I guess with EMS the code to check the status is already in-memory.
Of course if you're not using Serviceguard that doesn't help much.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 03:04 AM
11-27-2007 03:04 AM