- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sched_noage
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
07-17-2003 08:02 AM
07-17-2003 08:02 AM
Sched_noage
Thanks!
Karen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 08:45 AM
07-17-2003 08:45 AM
Re: Sched_noage
There are two ways I know of :
1) Walk the kernel process and thread structures to find this. Only HP staff are normally lazy enough to do this but I'll show you if you want! :-)
2) Use the pstat interface on 11.00 and beyond. A little knowledge of C is required here. The lwp_schedpolicy and pst_schedpolicy will tell you the thread/process scheduling, but you only really need to look at the thread data as they are really all that is scheduled to run. Compare the values returned for the definitions in /usr/include/sys/sched.h
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 09:00 AM
07-17-2003 09:00 AM
Re: Sched_noage
Thanks for the reply. I'd appreciate if you can show me how to do in either way.
Thanks
Karen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 09:57 AM
07-17-2003 09:57 AM
Re: Sched_noage
I'll show you the q4 way now, as it is quicker. I'll add the pstat code when I'm able to write it, tonight or more likely tomorrow morning.
11i
# ied q4 /stand/vmunix /dev/kmem
q4> load proc_t from proc_list next p_factp max nproc
q4> keep p_pid ==
q4> load kthread_t from p_firstthreadp next kt_factp max p_livethreads
q4> print -x kt_tid kt_schedpolicy
Which will produce something similar to the following, although how many entries will depend on how many threads you have.
kt_tid kt_schedpolicy
0x79b 0x2
0x79a 0x2
0x799 0x2
0x798 0x2
0x797 0x2
0x796 0x2
0x793 0x2
0x769 0x2
So you can see, after comparing 0x2 in sched.h that this is sched_hpux.
On hpux 11.00, things are a little different in the proc and thread commands:
# ied q4 /stand/vmunix /dev/kmem
q4> load struct proc from proc max nproc
q4> keep p_pid ==
q4> load kthread_t from p_firstthreadp next kt_link max p_livethreads
q4> print -x kt_tid kt_schedpolicy
Which gives:
kt_tid kt_schedpolicy
0x6a4 0x6
Here you can see the schedulicy policy is now 0x6, so this is SCHED_RTPRIO from sched.h. Basically I ran a job using rtprio and used this.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2003 02:46 AM
07-19-2003 02:46 AM
Re: Sched_noage
The pstat code is attached. I was a bit delayed as it uses different codes as the kernel/sched.h do, but i've listed them at the bottom of the output. You can compile it just using the following syntax:
# cc -o lwp lwp.c
The output is similar to the following and it takes a process PID as the argument:
# ./lwp 1785
Process: PID SCHED Command
: 1785 4 /opt/perf/bin/midaemon
Thread: TID SCHED
: 1823 4
: 1834 4
: 1835 4
HPUX TIMESHARE 1
HPUX RTPRIO 2
HPUX FIFO 4
POSIX RR 8
POSIX RR II 10
HPUX NOAGE 20
(it doesn't have the ":"s, hopefully these will keep the format)
I was also just thinking, if you wanted to scan all threads looking for certain schedling priorities, i.e. sched_noage, you could use (11i):
q4> load kthread_t from kthread_list next kt_factp max nkthread
q4> keep kt_schedpolicy == 0x8
q4> print -tx|grep kt_tid (find the thread you want to keep)
q4> keep kt_tid ==
q4> load proc_t from kt_procp
q4> print -x p_comm
p_comm
"midaemon"
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2003 03:04 AM
07-19-2003 03:04 AM
Re: Sched_noage
Sorry, that was the wrong version of the code. I won't post it again, if you just move "#endif" to immediately below "#define PS_NOAGE 0x20" this should work on 11.00 and 11i whether sched_noage is implemented or not.
Regards,
James.