查看指令用法:
#use <指令>
例如:查看pidin用法
# use pidin
pidin [options] argument - display system stats
-d delay delay period in tenths of a second
-F format a string consisting of format identifiers
-f formats contiguous string of format codes (-f mbe = -F %m %b %e)
-h this message
-k print PID & NID data until an error occurs
-l display statistics at intervals decided by -d option
-M formats format string (as in printf())
-n node remote QNX node you are interested in
-o prio run at prio priority
-P pid process family (pid or name) you are interested in
-p pid process (pid or name) you are interested in
-v verbose output
Formats
A - arguments
B - what you are blocked on
E - environment
F - thread flags
H - extended scheduling
I - pid and tid
J - state of the threads (sorted by tid) of the processes
K - what kernel call was executed last
More (Y/n)?
#pidin a
# pidin apid Arguments1 procnto-smp-instr -v -ae -bl -mLr~x -F 4000 -~s12291 slogger2 -U 15:15 -V -P /var/pps -G 5 -D SLOG2_PHYS -s 25804816386 bmetrics_service -m 0xC221000 -i addr=0x146BF658 -x addr=0x85E11040 -s 1020486 devc-quipv3 -e -b115200 -lt 1220487 secpolgenerate -l32776 /bin/qcpe_qhee -U 105:10532777 watchdog -u -w32778 memorydump -r -t -d full -U 712:712,2132779 syscache_service -U 147:147,2132780 pil_service -U 14:14,2132781 smmu_service -V -U 29:29,2132783 qcgpio32784 qcore36881 /bin/qcpe_service -U 102:10240978 on -T default_root_t ksh -l
#pidin a | grep <进程号/名称>
# pidin a | grep usb307255 io-usb-otg -t memory=/memory/ram/dma -dqcom-xhci ioport=0xa800000,irq=170,soc=8155,memory=/memory/ram/dma, -n /dev/usb2/io-usb-otg356410 usblauncher_otg -S 2 -c /etc/usblauncher/usb2.lua -M /etc/usblauncher/rules.mnt -m /var/pps -n /dev/usb2/io-usb-otg -E -e -0430143 io-hid -dusb1155112 grep usb
#slay <进程名>
# slay io-usb-otg
#
# pidin a | grep usb356410 usblauncher_otg -S 2 -c /etc/usblauncher/usb2.lua -M /etc/usblauncher/rules.mnt -m /var/pps -n /dev/usb2/io-usb-otg -E -e -0430143 io-hid -dusb1183784 grep usb
如上图,结束进程io-usb-otg之后,再次查看进程名,已经不存在了。
#kill
使用方法: kill [ -s signame | -signum | -signame ] {pid|job}...
kill -l [exit_status]
#kill <参数> <进程PID>
slog2info
# use slog2info
slog2info [options]If no options are specified then all the logs are displayed.Options:-w / -W Wait mode, listens for new prints. Ctrl-C to stop.[-w] Prints all available older logs prior to livestreaming.[-W] Ignores all older logs and starts live streamingfrom the current moment.-l filename Specify a specific buffer_set file to parse. This allowsselection of PID-specific buffer_set. Choose one of thefiles under /dev/shmem/slogger2/.-b bset1,bset2,... Only parse logs with that match one of the list of bufferset names.Alternative permitted usage: -b bset1 -b bset2 -b ...-i Display information about a buffer_set file specified by -l-r resetfilename Display the pre-reset logs contained in a special file thatslogger2 may have generated during startup when slogger2was invoked with the -d/-D option.-c Clears the live slog2 buffers. Can be used with -b toclear target buffer sets.-s / -S [-s] Show the numeric severity level for each log line.[-S] Show the severity level for each log line as one of:SLOG2_[SHUTDOWN|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG1|DEBUG2]-e code1,code2,... Only parse logs that match one of the specified eventcode names.-t Display thread id.-n Newline &#39;\n&#39; characters will be discarded from logs andeach log line in a multiline log will appear as aseparate log line in the output.-a Highlight logs with ANSI terminal color-codes. Logs of
清除log:
#slog2info -c
实时显示log:
#slog2info -w
mount
# use mount
Usage: mount [-abwruv] -t type [-o options] [special] mntpointmount [-abwruv] -T type [-o options] special [mntpoint]mount [-abwruv] -e [-t|T type] [-o options] special [mntpoint]mountWhere:-a Mount all devices listed in the fstab file. If type provided,mount only those entries. This option is ignored if a specialdevice or mountpoint is specified.-b Ignore fstab file.-o Gives server-specific options-r Mount read only-T Indicates the special device may not be a real devicebut rather a hint for the server. The server willautocreate an appropriate mountpoint if mntpoint isnot specified.-t Indicates the mount request should only go to the serverwho created/is responsible for the special device. Ifthe special device doesn&#39;t exist then this option behavesthe same as -T.-e Enumerate the device given by special-u Mount for update (remount)
# mount -b
/dev/disk/uda0.3A065A51-80C6-4439-8602-79437023632A.8 on / type qnx6
/dev/disk/uda0.1B81E7E6-F50D-419B-A739-2AEEF8DA3335.13 on /var type qnx6
/var/pps_persist on /var/pps type PPS
/dev/disk/uda0.6C95E238-E343-4BA8-B489-8681ED22AD0B.11 on /persist type qnx6
/dev/disk/uda0.ms.21 on /firmware type dos (fat16)
配置工具:ifconfig、route、hostname、netmap
查询工具:netstat、alive
ifconfig //与Linux基本一样
# ifconfig --help
ifconfig: illegal option -- -
usage: ifconfig [-h] [-m] [-v] [-z] [-L] interface[ af [ address [ dest_addr ] ] [ netmask mask ] [ prefixlen n ][ alias | -alias ] ][ up ] [ down ] [ metric n ] [ mtu n ][ nwid network_id ] [ nwkey network_key | -nwkey ][ powersave | -powersave ] [ powersavesleep duration ][ hidessid | -hidessid ] [ apbridge | -apbridge ][ [ af ] tunnel src_addr dest_addr ] [ deletetunnel ][ arp | -arp ][ media type ] [ mediaopt opts ] [ -mediaopt opts ] [ instance minst ][ preference n ][ vlan n vlanif i ][ agrport i ] [ -agrport i ][ anycast | -anycast ] [ deprecated | -deprecated ][ tentative | -tentative ] [ pltime n ] [ vltime n ] [ eui64 ][ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ][ ip4csum | -ip4csum ][ tcp4csum | -tcp4csum ][ udp4csum | -udp4csum ][ ip4csum-tx | -ip4csum-tx ] [ ip4csum-rx | -ip4csum-rx ][ tcp4csum-tx | -tcp4csum-tx ] [ tcp4csum-rx | -tcp4csum-rx ][ udp4csum-tx | -udp4csum-tx ] [ udp4csum-rx | -udp4csum-rx ][ acceptrtadv | -acceptrtadv ][ name
查看IP
# ifconfig
lo0: flags=8049
pflog0: flags=0 mtu 33136
emac0: flags=8943
如果出现status: no carrier是由于当前phy的link状态是down的,所以status是no carrier的
netstat//与Linux基本一样
# netstat --help
netstat: illegal option -- -
usage: netstat [-Aan] [-f address_family]netstat [-bdgiLmnqrsSv] [-f address_family] [-F fib_selector]netstat [-dn] [-I interface] [-w wait]netstat [-p protocol]netstat [-p protocol] -P pcbaddrnetstat [-p protocol] [-i] [-I Interface]netstat [-s] [-f address_family] [-i] [-I Interface]netstat [-s] [-B] [-I interface]
如何查看网卡状态:netstat –in
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
lo0 33136 0 0 0 0 0
lo0 33136 127/8 127.0.0.1 0 0 0 0 0
lo0 33136 ::1/128 ::1 0 0 0 0 0
lo0 33136 fe80::/64 fe80::1 0 0 0 0 0
pflog 33136 0 0 0 0 0
emac0 1500 02:04:00:00:01:02 0 0 0 0 0
emac0 1500 fe80::/64 fe80::4:ff:fe00:1 0 0 0 0 0
emac0 1500 192.168.1/24 192.168.1.1 0 0 0 0 0
vp0 1500 aa:aa:aa:aa:aa:aa 1026 0 1704 6 0
vp0 1500 fe80::/64 fe80::a8aa:aaff:f 1026 0 1704 6 0
bridg 1500 1026 0 1962 2484 0
如何查看路由表: netstat –rn
# netstat -rn
Routing tablesInternet:
Destination Gateway Flags Refs Use Mtu Interface
default 192.168.1.10 UGS 0 0 - emac0
127.0.0.1 127.0.0.1 UH 0 0 33136 lo0
192.168.1/24 link#33 UC 1 0 - emac0
192.168.1.10 link#33 UHL1c 2 3660 - emac0Internet6:
Destination Gateway Flags Refs Use Mtu Interface
::1 ::1 UH 0 0 33136 lo0
fe80::%lo0/64 fe80::1%lo0 U 0 0 - lo0
fe80::1%lo0 link#1 UHL 0 0 - lo0
fe80::%emac0/64 link#33 UC 0 0 - emac0
fe80::4:ff:fe00:102%emac0 02:04:00:00:01:02 UHL 0 0 - lo0
fe80::%vp0/64 link#34 UC 0 0 - vp0
fe80::a8aa:aaff:feaa:aaaa%vp0 aa:aa:aa:aa:aa:aa UHL 0 0 - lo0
ff01:1::/32 ::1 UC 0 0 33136 lo0
ff01:21::/32 link#33 UC 0 0 - emac0
ff01:22::/32 link#34 UC 0 0 - vp0
ff02::%lo0/32 ::1 UC 0 0 33136 lo0
ff02::%emac0/32 link#33 UC 0 0 - emac0
ff02::%vp0/32 link#34 UC 0 0 - vp0
如何检查网络监听:netstat –an
nicinfo //显示网络控制接口信息
# use nicinfo
nicinfo - Display information about network interface controllers.nicinfo [-cgsv] [iface...]Options:
-c Display config only
-s Display statistics only
-g Display general statistics only
-v Be verboseDescription:
This utility displays information about the given network interfaces, or
all interfaces if none are specified. The information includes the number
of packets transmitted and received, collisions, and other errors.
# nicinfo -c
pflog0:emac0:EMAC Ethernet Device Ethernet ControllerLink is DOWNPhysical Node ID ........................... 020400 000102Current Physical Node ID ................... 020400 000102Current Operation Rate ..................... UnknownActive Interface Type ...................... MIIActive PHY address ....................... 7Maximum Transmittable data Unit ............ 1514Maximum Receivable data Unit ............... 1514Promiscuous Mode ........................... OnMulticast Support .......................... Enabled
showmem
showmem [options] [argument]
showmem (w/o option)displays process wise allocation from sysram
Options:
-a Display process wise allocation for all carveouts, export to text file.
-t as_name Display memory usage of process level for pmem.
-p pid Display memory allocation of specified process.
-s Display memory summary for sysram and pmem.
-l Display memory layout.
carv_name Display process wise allocation for carveout "carv_name".
-h Print this help message.
.-------------------------------------.<-- 0x80001000
| sysram , 28 KB |
.-------------------------------------.<-- 0x80008000
| hole , 12 KB |
.-------------------------------------.<-- 0x8000b000
| inactive_ringbuffer , 16 KB |
.-------------------------------------.<-- 0x8000f000
| ringbuffer , 16 KB |
.-------------------------------------.<-- 0x80013000
| hole , 40 KB |
.-------------------------------------.<-- 0x8001d000
| active_lun0_array , 8 KB |
.-------------------------------------.<-- 0x8001f000
| hole , 44 KB |
.-------------------------------------.<-- 0x8002a000
| active_lun5_array , 4 KB |
.-------------------------------------.<-- 0x8002b000
| hole , 64 KB |
.-------------------------------------.<-- 0x8003b000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 86.77 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x85700000
| |
| |
| |
| HYP , 6.00 MB |
| |
| |
| |
.-------------------------------------.<-- 0x85d00000
| hole , 17592186044416.00 MB |
.-------------------------------------.<-- 0x85700200
| startup , 408 KB |
.-------------------------------------.<-- 0x85766308
| |
| |
| imagefs , 4.61 MB |
| |
| |
.-------------------------------------.<-- 0x85c03160
| hole , 1011 KB |
.-------------------------------------.<-- 0x85d00000
| |
| MPSS_EFS_XBL , 2.00 MB |
| |
.-------------------------------------.<-- 0x85f00000
| AOP_IMAGE , 128 KB |
.-------------------------------------.<-- 0x85f20000
| AOP_CMD_DB , 128 KB |
.-------------------------------------.<-- 0x85f40000
| sysram , 768 KB |
.-------------------------------------.<-- 0x86000000
| |
| SMEM , 2.00 MB |
| |
.-------------------------------------.<-- 0x86200000
| TZ_STAT , 1.00 MB |
.-------------------------------------.<-- 0x86300000
| |
| |
| |
| |
~ ~
| |
| |
| |
| pIMEM_VAULT , 56.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x89b00000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 28.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x8b700000
| |
| |
| CAMERA , 5.00 MB |
| |
| |
.-------------------------------------.<-- 0x8bc00000
| WLAN_FW , 1.50 MB |
.-------------------------------------.<-- 0x8bd80000
| NPU_FW , 512 KB |
.-------------------------------------.<-- 0x8be00000
| |
| |
| |
| |
~ ~
| |
| |
| |
| ADSP , 26.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x8d800000
| |
| |
| |
| |
~ ~
| |
| |
| |
| MPSS , 150.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x96e00000
| |
| |
| VIDEO , 5.00 MB |
| |
| |
.-------------------------------------.<-- 0x97300000
| |
| |
| |
| |
~ ~
| |
| |
| |
| SLPI , 20.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x98700000
| IPA_FW , 64 KB |
.-------------------------------------.<-- 0x98710000
| IPA_GSI , 28 KB |
.-------------------------------------.<-- 0x98717000
| GPU_MICRO , 8 KB |
.-------------------------------------.<-- 0x98719000
| GSI_QUP , 72 KB |
.-------------------------------------.<-- 0x9872b000
| sysram , 852 KB |
.-------------------------------------.<-- 0x98800000
| SPSS , 1.00 MB |
.-------------------------------------.<-- 0x98900000
| |
| |
| |
| |
~ ~
| |
| |
| |
| CDSP , 20.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x99d00000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 71.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x9e400000
| |
| |
| |
| |
~ ~
| |
| |
| |
| QSEECOM , 20.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x9f800000
| |
| |
| |
| |
| UEFI , 8.00 MB |
| |
| |
| |
| |
.-------------------------------------.<-- 0xa0000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| ifs2 , 135.36 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xa875c000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 120.64 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xb0000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| gvm_sysram2 , 128.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xb8000000
| |
| |
| |
| |
| spss_mem , 8.00 MB |
| |
| |
| |
| |
.-------------------------------------.<-- 0xb8800000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 114.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xbfa00000
| |
| |
| |
| hole , 6.00 MB |
| |
| |
| |
.-------------------------------------.<-- 0xc0000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| gvm_secmem , 324.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xd4400000
| |
| |
| |
| |
| |
| mdsp_frpc , 10.00 MB |
| |
| |
| |
| |
| |
.-------------------------------------.<-- 0xd4e00000
| |
| |
| |
| |
| |
| mdf_mem , 10.00 MB |
| |
| |
| |
| |
| |
.-------------------------------------.<-- 0xd5800000
| |
| |
| |
| |
| adsp_heap , 9.00 MB |
| |
| |
| |
| |
.-------------------------------------.<-- 0xd6100000
| sysram , 1.00 MB |
.-------------------------------------.<-- 0xd6200000
| |
| |
| |
| |
| |
| cvp_mem , 10.00 MB |
| |
| |
| |
| |
| |
.-------------------------------------.<-- 0xd6c00000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 64.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xdac00000
| gptp_timedata , 4 KB |
.-------------------------------------.<-- 0xdac01000
| gvm_emac_ipa , 8 KB |
.-------------------------------------.<-- 0xdac03000
| sysram , 1012 KB |
.-------------------------------------.<-- 0xdad00000
| |
| |
| |
| |
~ ~
| |
| |
| |
| dma , 160.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0xe4d00000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 435.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x100000000
| |
| |
| gvm_ion_audio_mem , 4.00 MB |
| |
| |
.-------------------------------------.<-- 0x100400000
| |
| |
| |
| |
| |
| |
| |
| |
| smmu_s1_pt , 16.00 MB |
| |
| |
| |
| |
| |
| |
| |
| |
.-------------------------------------.<-- 0x101400000
| |
| |
| |
| |
| |
| SLOG2_PHYS , 10.00 MB |
| |
| |
| |
| |
| |
.-------------------------------------.<-- 0x101e00000
| RESET_INFO , 1.00 MB |
.-------------------------------------.<-- 0x101f00000
| RESET_INFO_QNX_1 , 1.00 MB |
.-------------------------------------.<-- 0x102000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| mm_dma , 1280.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x152000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| cp_b_heap , 150.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x15b600000
| |
| |
| |
| |
~ ~
| |
| |
| |
| cp_p_heap , 50.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x15e800000
| |
| |
| |
| |
~ ~
| |
| |
| |
| cp_np_heap , 125.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x166500000
| |
| |
| |
| |
~ ~
| |
| |
| |
| gvm_pmem , 1300.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x1b7900000
| |
| |
| TRACEKEV_PHYS , 5.00 MB |
| |
| |
.-------------------------------------.<-- 0x1b7e00000
| |
| |
| |
| |
| |
| PROCSNAP_PHYS , 10.00 MB |
| |
| |
| |
| |
| |
.-------------------------------------.<-- 0x1b8800000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 120.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x1c0000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| gvm_sysram1 , 6144.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x340000000
| |
| |
| |
| |
~ ~
| |
| |
| |
| sysram , 803.60 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x372399000
| |
| |
| |
| |
~ ~
| |
| |
| |
| hole , 144.34 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x37b3f0000
| |
| |
| |
| |
~ ~
| |
| |
| |
| qcpe , 73.00 MB |
| |
| |
| |
| |
~ ~
| |
| |
| |
.-------------------------------------.<-- 0x37fcf0000
| bmetrics , 64 KB |
.-------------------------------------.<-- 0x37fd00000