sem
显示信号量信息。
格式
sem semaphore handle
说明
[root@sylixos:/root]# help sem
show semaphore information.
sem semaphore handle
[root@sylixos:/root]#
此命令显示指定信号量的信息。
样例
注意: tp
命令的作用是展示系统被阻塞线程信息。详细字段信息参考 tp
命令
[root@sylixos:/root]# tp
thread pending show >>
NAME TID PID STAT DELAY PEND EVENT OWNER
---------------- ------- ----- ---- ---------- ----------------------- -------
t_itimer 4000001 0 SLP 6546 0:
t_isrdefer 4000002 0 SEM 0 10000002:job_sync
t_except 4000003 0 SEM 0 10000003:job_sync
t_log 4000004 0 MSGQ 0 1c000004:log_msg:R
t_power 4000005 0 SLP 675 0:
t_hotplug 4000006 0 SEM 675 10000015:job_sync
t_reclaim 4000008 0 MSGQ 0 1c000021:res_reclaim:R
t_sync 4000009 0 SLP 705 0:
t_dcwpipe 400000a 0 SEM 0 c00005c:dc_mq
t_tpsfs 400000b 0 SLP 666 0:
t_console 400000c 0 MSGQ 0 1c0000cc:xkbd_q:R
t_netjob 400000d 0 SEM 0 10000088:job_sync
t_netproto 400000e 0 MSGQ 44 1c00008c:net_msg:R
t_snmp 400000f 0 MSGQ 0 1c00009f:net_msg:R
t_ftpd 4000010 0 MSGQ 0 1c0000c1:net_msg:R
t_telnetd 4000011 0 MSGQ 0 1c0000c2:net_msg:R
t_jobq 4000013 0 SEM 0 100000b8:job_sync
t_xinput 4000015 0 SEM 0 100000d2:sel_wakeup
t_xcondev 4000016 0 MSGQ 0 1c0000d7:xcon_cq:R
main.jsc 4000017 1 SEM 0 100000e0:sel_wakeup
t_tshell 400001a 0 SEM 0 10000040:ty_rsync
jsre_timer 400001b 1 VUTX 1025 f122940:1381
imgpull.jsc 400001c 1 SEM 0 10000224:sel_wakeup
assistant.jsc 400001d 1 SEM 0 10000274:sel_wakeup
pending thread: 24
[root@sylixos:/root]# sem 10000002
Semaphore show >>
Semaphore Name : job_sync
Semaphore Id : 0x10000002
Semaphore Type : BINARY
Thread Queuing : FIFO
Pended Threads : 1
Semaphore Value : EMPTY
[root@sylixos:/root]#
字段说明:
字段 | 说明 |
---|---|
Semaphore Name | 信号量名 |
Semaphore Id | 信号量句柄(ID) |
Semaphore Type | 信号量类型,见下表 |
Thread Queuing | 信号量列选项(PRIORITY / FIFO) |
Pended Threads | 被解锁的线程数量 |
Semaphore Value | 信号量当前计数值 |
Semaphore Type | 说明 |
--- | --- |
BINARY | 二进制信号量 |
COUNTER | 计数型信号量 |
MUTEX | 互斥型信号量 |
RW | 读写信号量 |