HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Check current utilization of kernel parameter "kthread" value.

 
SOLVED
Go to solution

Check current utilization of kernel parameter "kthread" value.

Dear gurus,

We are having HP Ux 11.11 server. What is the command to check current utilization of kernel parameter "kthread".

We have tried glance -t but it is not showing kthread.



ProcList CPU Rpt Mem Rpt Disk Rpt NextKeys SlctProc Help Exit
B3692A GlancePlus C.03.72.00 19:13:00 tstpag11 9000/800 Current Avg High
---------------------------------------------------------------------------------------------------------------
CPU Util SSU U | 11% 11% 11%
Disk Util F F | 5% 3% 5%
Mem Util S SU UB B | 88% 88% 88%
Swap Util U UR R | 70% 70% 70%
---------------------------------------------------------------------------------------------------------------
SYSTEM TABLES REPORT Users= 2

System Table Available Used Utilization High(%)
--------------------------------------------------------------------------------
Proc Table (nproc) 4820 288 6 6
File Table (nfile) 63498 8993 14 14
Shared Mem Table (shmmni) 512 16 3 3
Message Table (msgmni) 4096 2 0 0
Semaphore Table (semmni) 4096 32 1 1
File Locks (nflocks) 4096 60 1 1
Pseudo Terminals (npty) 60 0 0 0
Buffer Headers (nbuf) na 686868 na na


Thanks in advance.
11 REPLIES
Jeeshan
Honored Contributor

Re: Check current utilization of kernel parameter "kthread" value.

check with command

#sysdef
a warrior never quits

Re: Check current utilization of kernel parameter "kthread" value.

>We have tried glance -t but it is not showing kthread.

Hmm, that's where I would have looked. Is there a detailed report for tables?
In gpm, there is process screen. I don't know if there is a separate thread screen or threads for a given process.

I assume you could use pstat(2) to count up all of the threads, pstat_getlwp(2).

Re: Check current utilization of kernel parameter "kthread" value.

Hi Dennis,

Below is the detail report of kernel parameter

#kmtune
Parameter Current Dyn Planned Module Version
===============================================================================
NSTRBLKSCHED - - 2
NSTREVENT 50 - 50
NSTRPUSH 16 - 16
NSTRSCHED 0 - 0
STRCTLSZ 1024 - 1024
STRMSGSZ 65535 - 65535
acctresume 4 - 4
acctsuspend 2 - 2
aio_listio_max 256 - 256
aio_max_ops 2048 - 2048
aio_physmem_pct 10 - 10
aio_prio_delta_max 20 - 20
allocate_fs_swapmap 0 - 0
alwaysdump 0 - 0
bcvmap_size_factor 2 - 2
bootspinlocks - - 256
bufcache_hash_locks 128 - 128
bufpages 0 - (NBUF*2)
chanq_hash_locks 256 - 256
core_addshmem_read 0 Y 0
core_addshmem_write 0 Y 0
create_fastlinks 0 - 0
dbc_max_pct 10 - 10
dbc_min_pct 5 - 5
default_disk_ir 0 - 0
desfree - - 0
disksort_seconds 0 - 0
dnlc_hash_locks 512 - 512
dontdump 0 - 0
dskless_node - - 0
dst 1 - 1
effective_maxpid - - ((NPROC<=30000)?30000:(NPROC*5/4))
eisa_io_estimate - - 0x300
enable_idds 0 - 0
eqmemsize 15 - 15
executable_stack 0 - 0
fcp_large_config 0 - 0
file_pad - - 10
fs_async 1 - 1
ftable_hash_locks 64 - 64
gvid_no_claim_dev 0 - 0
hdlpreg_hash_locks 128 - 128
hfs_max_ra_blocks 8 - 8
hfs_max_revra_blocks 8 - 8
hfs_ra_per_disk 64 - 64
hfs_revra_per_disk 64 - 64
hp_hfs_mtra_enabled 1 - 1
hpux_aes_override - - 0
initmodmax 50 - 50
io_ports_hash_locks 64 - 64
iomemsize - - 40000
ksi_alloc_max 38560 - 38560
ksi_send_max 32 - 32
lotsfree - - 0
max_async_ports 50 - 50
max_fcp_reqs 512 - 512
max_mem_window 0 - 0
max_thread_proc 2048 - 2048
maxdsiz 0x40000000 - 0x40000000
maxdsiz_64bit 2147483648 - 2147483648
maxfiles 2048 - 2048
maxfiles_lim 2048 Y 2048
maxqueuetime - - 0
maxssiz 134217728 - 134217728
maxssiz_64bit 1073741824 - 1073741824
maxswapchunks 16384 - 16384
maxtsiz 0x4000000 Y 0x4000000
maxtsiz_64bit 0x40000000 Y 0x40000000
maxuprc 4338 Y 4338
maxusers 600 - 600
maxvgs 80 - 80
mesg 1 - 1
minfree - - 0
modstrmax 500 - 500
msgmap 6642 - 6642
msgmax 32768 Y 32768
msgmnb 65535 Y 65535
msgmni 4096 - 4096
msgseg 32767 - 32767
msgssz 128 - 128
msgtql 6640 - 6640
nbuf 0 - 0
ncallout 8467 - 8467
ncdnode 150 - 150
nclist 9700 - 9700
ncsize 35480 - 35480
ndilbuffers 30 - 30
netisr_priority - - -1
netmemmax - - 0
nfile 63488 - 63488
nflocks 4096 - 4096
nhtbl_scale 0 - 0
ninode 34816 - 34816
nkthread 8451 - 8451
nni - - 2
no_lvm_disks 0 - 0
nproc 4820 - 4820
npty 60 - 60
nstrpty 60 - 60
nstrtel 600 - 600
nswapdev 10 - 10
nswapfs 10 - 10
nsysmap 9640 - 9640
nsysmap64 9640 - 9640
o_sync_is_o_dsync 0 - 0
page_text_to_local - - 0
pfdat_hash_locks 128 - 128
public_shlibs 1 - 1
region_hash_locks 128 - 128
remote_nfs_swap 0 - 0
rtsched_numpri 32 - 32
scroll_lines 100 - 100
scsi_max_qdepth 8 Y 8
scsi_maxphys 1048576 - 1048576
select_enh 0 Y 0
sema 1 - 1
semaem 16384 - 16384
semmap 4098 - 4098
semmni 4096 - 4096
semmns 32767 - 32767
semmnu 4816 - 4816
semmsl 2048 Y 2048
semume 64 - 64
semvmx 32768 - 32768
sendfile_max 0 - 0
shmem 1 - 1
shmmax 24576000000 Y 24576000000
shmmni 512 - 512
shmseg 120 Y 120
st_ats_enabled 0 - 0
st_fail_overruns 0 - 0
st_large_recs 0 - 0
st_san_safe 0 - 0
streampipes 1 - 1
swapmem_on 1 - 1
swchunk 8192 - 8192
sysv_hash_locks 128 - 128
tcphashsz 0 - 0
timeslice 10 - (100/10)
timezone 420 - 420
unlockable_mem 0 - 0
vas_hash_locks 128 - 128
vnode_cd_hash_locks 128 - 128
vnode_hash_locks 128 - 128
vps_ceiling 64 - 64
vps_chatr_ceiling 1048576 - 1048576
vps_pagesize 4 - 4
vx_fancyra_enable 0 - 0
vx_maxlink 32767 - 32767
vx_ncsize 1024 - 1024
vx_ninode 0 - 0
vxfs_max_ra_kbytes 1024 - 1024
vxfs_ra_per_disk 1024 - 1024
#

What is command to see current utilazation of kthread.
VK2COT
Honored Contributor

Re: Check current utilization of kernel parameter "kthread" value.

Hello,

Did you look at nkthread kernel parameter?
That is the one defining number of threads
of the server.

Depending which version on platform of HP-UX you run:

kmtune -q nkthread
kctune -v nkthread

Note that in versions HP-UX 11.23 and 11.31,
there are constraints for nkthread.

In HP-UX 11.11, nkthread is based on a formula with nproc parameter.

Cheers,

VK2COT


VK2COT - Dusan Baljevic

Re: Check current utilization of kernel parameter "kthread" value.

>Below is the detail report of kernel parameter

I meant details in glance -t.
This just gives the max: nkthread 8451

Re: Check current utilization of kernel parameter "kthread" value.

glance -t output

B3692A GlancePlus C.03.72.00 22:49:19 tstpag11 9000/800 Current Avg High
------------------------------------------------------------------------------------------------------------------------------
CPU Util S SU U | 10% 10% 13%
Disk Util F F | 6% 5% 7%
Mem Util S SU UB B | 88% 88% 88%
Swap Util U UR R | 70% 70% 70%
------------------------------------------------------------------------------------------------------------------------------
SYSTEM TABLES REPORT Users= 2

System Table Available Used Utilization High(%)
--------------------------------------------------------------------------------
Proc Table (nproc) 4820 288 6 6
File Table (nfile) 63498 9242 15 15
Shared Mem Table (shmmni) 512 16 3 3
Message Table (msgmni) 4096 2 0 0
Semaphore Table (semmni) 4096 32 1 1
File Locks (nflocks) 4096 60 1 1
Pseudo Terminals (npty) 60 0 0 0
Buffer Headers (nbuf) na 686868 na na























Page 1 of 2
ProcList CPU Rpt Mem Rpt Disk Rpt
Slawomir Gora
Honored Contributor

Re: Check current utilization of kernel parameter "kthread" value.

Hello,

you can read current value of nkthread useing this procedure.


1. You may need to preprocess the kernel for debugging first:
# /usr/contrib/bin/q4pxdb /stand/vmunix

2. Now start Q4 using the running kernel /stand/vmunix and the device file to access the memory /dev/mem
# /usr/contrib/bin/q4 /stand/vmunix /dev/mem

q4> nkthread
07020 3600 0xe10

q4> load struct kthread from kthread_list next kt_factp max nkthread
loaded 367 struct kthreads as a linked list (stopped by null pointer)

--- this means 367 out of 3600 (=nkthread) threads are currently existing.


Re: Check current utilization of kernel parameter "kthread" value.

>glance -t output ... Page 1 of 2

You need to hit a space to get the next page. Unfortunately it doesn't give kthread.

See my reply to this thread how to get it in gpm:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1296550
Suraj K Sankari
Honored Contributor

Re: Check current utilization of kernel parameter "kthread" value.

Hi,

You can used any of this

sysdef
kctune
kmtune
kcweb

Suraj
Solution

Re: Check current utilization of kernel parameter "kthread" value.

>Suraj: You can used any of this

It helps if you read all of the replies first.
None of these will do what Ajeet wants, unless kcweb does?

kcusage(1m) will give the info on 11.23:
nkthread 412 / 8416

Re: Check current utilization of kernel parameter "kthread" value.

Here is an example C program that calls pstat_getlwp(2).