2010年4月7日水曜日

PR-S300SEのコンソールコマンド

RXのラインをつないでリターンキーを叩いてみるとプロンプト"->"が出た。VxWorksはさわったことがないのだが、helpとやれば何とかなるだろう、とやってみたら成功。
いくつかのコマンド群についてもヘルプがあるようなのでひととおり叩いてみた。実装されていないものもある。

-> help

help Print this list
ioHelp Print I/O utilities help info
dbgHelp Print debugger help info
nfsHelp Print nfs help info
netHelp Print network help info
spyHelp Print task histogrammer help info
timexHelp Print execution timer help info
h [n] Print (or set) shell history
i [task] Summary of tasks' TCBs
ti task Complete info on TCB for task
sp adr,args... Spawn a task, pri=100, opt=0x19, stk=20000
taskSpawn name,pri,opt,stk,adr,args... Spawn a task
td task Delete a task
ts task Suspend a task
tr task Resume a task
d [adr[,nunits[,width]]] Display memory
m adr[,width] Modify memory
mRegs [reg[,task]] Modify a task's registers interactively
pc [task] Return task's program counter

Type to continue, Q to stop:

iam "user"[,"passwd"] Set user name and passwd
whoami Print user name
devs List devices
ld [syms[,noAbort][,"name"]] Load stdin, or file, into memory
(syms = add symbols to table:
-1 = none, 0 = globals, 1 = all)
lkup ["substr"] List symbols in system symbol table
lkAddr address List symbol table entries near address
checkStack [task] List task stack sizes and usage
printErrno value Print the name of a status value
period secs,adr,args... Spawn task to call function periodically
repeat n,adr,args... Spawn task to call function n times (0=forever)
version Print VxWorks version info, and boot line

NOTE: Arguments specifying 'task' can be either task ID or name.

value = 1 = 0x1
-> ioHelp

cd "path" Set current working path
pwd Print working path
ls ["wpat"[,long]] List contents of directory
ll ["wpat"] List contents of directory - long format
lsr ["wpat"[,long]] Recursive list of directory contents
llr ["wpat"] Recursive detailed list of directory
rename "old","new" Change name of file
copy ["in"][,"out"] Copy in file to out file (0 = std in/out)
cp "wpat","dst" Copy many files to another dir
xcopy "wpat","dst" Recursively copy files
mv "wpat","dst" Move files into another directory
xdelete "wpat" Delete a file, wildcard list or tree
attrib "path","attr" Modify file attributes
xattrib "wpat","attr" Recursively modify file attributes
chkdsk "device", L, V Consistency check of file system
diskInit "device" Initialize file system on disk
diskFormat "device" Low level and file system disk format

"attr" contains one or more of: " + - A H S R" characters

Type to continue, Q to stop:

"wpat" may be name of a file, directory or wildcard pattern
in which case "dst" must be a directory name
chkdsk() params: L=0, check only, L=2, check and fix, V=0x200 verbose

value = 1 = 0x1
-> dbgHelp

dbgHelp Print this list
dbgInit Install debug facilities
b Display breakpoints and eventpoints
b addr[,task[,count]] Set breakpoint
e addr[,eventNo[,task[,func[,arg]]]]] Set eventpoint
bd addr[,task] Delete breakpoint
bdall [task] Delete all breakpoints and eventpoints
c [task[,addr[,addr1]]] Continue from breakpoint
cret [task] Continue to subroutine return
s [task[,addr[,addr1]]] Single step
so [task] Single step/step over subroutine
l [adr[,nInst]] List disassembled memory
tt [task] Do stack trace on task
bh addr[,access[,task[,count[,quiet]]]] Set hardware breakpoint
access : 1 - write 2 - read
3 - read/write For R4650 processors:
access : 0 - instruction 1 - write
2 - read 3 - read/write
value = 293 = 0x125
-> nfsHelp
undefined symbol: nfsHelp
-> netHelp


hostAdd "hostname","inetaddr" - add a host to remote host table;
"inetaddr" must be in standard
Internet address format e.g. "90.0.0.4"
hostShow - print current remote host table
netDevCreate "devname","hostname",protocol
- create an I/O device to access files
on the specified host
(protocol 0=rsh, 1=ftp)
routeAdd "destaddr","gateaddr" - add route to route table
routeDelete "destaddr","gateaddr" - delete route from route table

routeShow - print current route table
iam "usr"[,"passwd"] - specify the user name by which you
will be known to remote hosts
(and optional password)
whoami - print the current remote ID
rlogin "host" - log in to a remote host;
"host" can be inet address or
host name in remote host table

Type to continue, Q to stop:



ifShow ["ifname"] - show info about network interfaces
inetstatShow - show all Internet protocol sockets
tcpstatShow - show statistics for TCP
udpstatShow - show statistics for UDP
ipstatShow - show statistics for IP
icmpstatShow - show statistics for ICMP
arptabShow - show a list of known ARP entries
mbufShow - show mbuf statistics

EXAMPLE: -> hostAdd "wrs", "90.0.0.2"
-> netDevCreate "wrs:", "wrs", 0
-> iam "fred"
-> copy -> rlogin "wrs" /* rlogin to host "wrs" */

value = 1 = 0x1
-> spyHelp
spy not configured into this system.
value = 37 = 0x25 = '%'
-> timeHelp
undefined symbol: timeHelp

ここでひとまずタスク(UNIXのプロセスに相当)の一覧をとってみる。ルーターらしいタスクがいろいろ走っている模様。

-> i

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
---------- ------------ -------- --- ---------- -------- -------- ------- -----
tExcTask excTask 87de8450 0 PEND 80b30674 87de82f0 0 0
tLogTask logTask 87de5610 0 PEND 80b30674 87de54b0 0 0
tShell shell 8721b2b0 1 READY 80b3e7c0 8721ae80 0 0
voipStartTa80453e20 843866d0 1 PEND 80b30674 84386540 0 0
tIpsec ssh_ipsecpm_ 834ae390 49 PEND+T 80b08360 834adee0 3d0002 6
tNetTask netTask 87ddeda0 50 READY 80b08360 87ddecd0 6d0002 0
teMngTask teMngTask 845f4a50 52 PEND+T 80b30674 845f48c0 3d0004 72
wzcTask 80acd990 8468b3a0 55 READY 80b08360 8468b070 3d0004 0
rt4Task 803a82e0 8463bab0 55 PEND 80b30674 8463b930 0 0
tDhcpsTask dhcpsStart 844ae430 56 PEND 80b08360 844ae1a0 3d0002 0
tDhcpcState80135828 84499a60 56 PEND 80b08360 84499970 0 0
tDhcpcReadTdhcpcRead 84491540 56 PEND 80b08360 844912b0 3d0002 0
tDhcpsMngTa8017b890 844a5f10 57 PEND 80b30674 844a5cb0 0 0
vpnSigTask 808edb50 843b8800 57 PEND 80b30674 843b8650 0 0
tDhcp6c 802082d0 845d3470 58 PEND 80b08360 845d3180 3d0002 0
tIpv6Info dhcp6cApiTas 87210f00 59 PEND 80b30674 87210da0 0 0
IPsecMngTasipsecMngTask 84664e40 60 PEND 80b30674 84664c80 0 0
tJavavmWdtT80a42398 836b9950 64 DELAY 8006af90 836b9890 0 19
tJavavmTask80a40d80 836a9410 65 READY 80b08360 836a9210 3d0004 0
pthr6 8004b750 83699170 65 PEND 80b08360 83699060 3d0004 0
pthr7 8004b750 83690ed0 66 PEND 80b08360 83690d50 0 0
pthr8 8004b750 83688c30 66 PEND 80b08360 83688ab0 0 0
Uni1ModeMng8067ca60 84fc28e0 70 PEND 80b30674 84fc2750 0 0
SYS_PPP_C_18063a8a8 84659040 80 PEND 80b08360 84658f20 0 0
tpppcMng 8064b808 8431c6f0 81 PEND 80b30674 8431c580 3d0001 0
ipv4AddrDupipv4AddrDupl 845c2880 82 PEND 80b30674 845c2740 0 0
macStat0 80073e88 84fb91a0 90 PEND 80b30674 84fb9050 0 0
wlanMngTaskwlanMngTask 845e4010 90 PEND 80b30674 845e3e90 0 0
ARP_REQ_T arp_req_task 8459de40 90 PEND 80b08360 8459dd60 0 0
linkMng 8023e420 84fbe0c0 100 PEND 80b30674 84fbdef0 0 0
lanPhyMon 8023c6e8 84693900 100 PEND 80b30674 84693780 0 0
wanPhyMon 8023c6e8 8466d910 100 PEND 80b30674 8466d790 0 0
tRtAdv rtadv_start 845dbaf0 100 DELAY 8006af90 845daca0 0 39
tDnsPro 80233468 8444df40 100 READY 80b08360 8444daf0 3d0004 0
tDnsProWan 80235290 84445a20 100 READY 80b08360 84445540 3d0004 0
tMldProxy mldproxy_mai 84334ed0 100 PEND+T 80b08360 84334af0 3d0002 36
lltdTask event_mainlo 838ce410 100 PEND+T 80b08360 838ce1b0 3d0002 130
dhcpcMngTas80147750 84489020 101 PEND 80b30674 84488e80 0 0
tMLDSnoop 803957e0 8433d170 101 PEND 80b08360 8433d050 0 0
ntpcMngTaskntpcMngTask 845ec530 104 PEND 80b30674 845ec3b0 0 0
tDhcp6s 80215908 845cae10 106 PEND 80b08360 845ca460 3d0002 0
natTask natTask 84606580 110 PEND 80b30674 84606410 0 0
ipfilterTasipFilterTask 8460eaa0 111 PEND 80b30674 8460e930 0 0
SecureBind_secureBindMn 8364da80 120 PEND 80b30674 8364d8f0 0 0
tIrdaJava 80a24528 833bfb00 128 DELAY 8006af90 833bfa60 0 86386930
pthr9 8004b750 833f0d60 128 PEND 80b08360 833f09e0 0 0
pthr10 8004b750 833e8ac0 128 SUSPEND 8006b988 833e87e0 0 0
pthr11 8004b750 833e0820 128 READY 80b08360 833e0580 3d0004 0
pthr12 8004b750 833d8580 128 READY 8006af90 833d8460 0 0
pthr13 8004b750 837ae980 128 PEND 80b08360 837ae710 3d0002 0
brCfgTask 8064ed10 84633590 150 PEND 80b30674 84633440 6d0002 0
FdbTask 806565e8 83776720 150 DELAY 8006af90 83776660 0 15116
tPhyInt 80072fb0 84fb6be0 180 READY 8006af90 84fb6b00 0 0
wpsEventTas80a68458 84682880 190 READY 80b30674 84682700 3d0004 0
wpsTimerTas80a79938 8467a360 200 PEND+T 80b30674 8467a1d0 3d0004 15
httpd httpdTask 8446e9d0 200 PEND 80b08360 8446e6d0 3d0002 0
autoUpdateTautoUpdateTa 84376430 200 PEND 80b30674 84376150 0 0
tRemoteMntBremoteMntBne 84324990 200 PEND 80b08360 84324890 0 0
tQcNotif ssh_if_chg_n 834b6be0 200 PEND+T 80b08360 834b6550 3d0002 239
httpPLTask httpProxyTas 8432cc30 201 PEND+T 80b08360 8432c420 3d0002 15111
rtspPTask rtspProxyTas 83821d60 201 READY 80b08360 83820c90 3d0004 0
tDevInfo uni2infoMngT 8382a000 208 DELAY 8006af90 83829f60 0 2809
tIrDApp 80a24ec0 84303f10 210 PEND 80b30674 84303430 0 0
dnsProxyMsg80229d60 83819ac0 210 PEND 80b30674 83819920 0 0
tDlnaDmcEve809eb058 836ddd40 211 PEND 80b30674 836ddbc0 0 0
tDlnaDmc 809e81b8 836d57e0 211 PEND 80b08360 836d5710 0 0
pthr4 8004b750 836cd1b0 211 READY 80b08360 836cc840 3d0004 0
tDlnaIpcSer809e7568 8430c1b0 220 DELAY 8006af90 8430c100 0 86385102
pthr3 8004b750 836e6ce0 220 READY 80b08360 836e6360 3d0004 0
pthr5 8004b750 836c28d0 220 READY 80b08360 836c2630 3d0004 0
upnpGwSockTupnpGwSockTa 838b48f0 228 READY 80b08360 838b44b0 3d0004 0
logStoreTas80349780 8523d350 230 PEND 80b08360 8523ce50 380003 0
cnfStoreTas800c1910 84fd0b80 230 PEND 80b08360 84fd0ac0 0 0
tUPnPc upnpDevMngMa 838ac650 230 READY 8006af90 838abdb0 3d0002 0
launchd 80a519a0 84314450 239 DELAY 8006af90 84314360 0 2
tRomTask AllegroTask 845fe060 240 READY 8006af90 845fdfa0 3d0002 0
tFfsBgCache80a7b698 83678220 243 DELAY 8006af90 83678160 0 246
tWolrelay wolRelayTask 838c6170 245 PEND 80b08360 838c5ee0 3d0002 0
javaPingTas80a44d08 8363e6e0 245 PEND 80b30674 8363e490 0 0
tJavaCbkMng80a43b10 836b16b0 251 PEND 80b30674 836b1560 0 0
netTaskAid 800f6d90 87de02c0 255 READY 800f6dfc 87de0230 0 0
value = 0 = 0x0

デバイスの一覧も見る。UNIXとは名前の流儀が違うようだ。

-> devs
drv name
0 /null
1 /tyCo/0
1 /tyCo/1
5 /dev/flash0
6 /effs
3 /tmp
3 /var
3 /apps
7 /proc
3 /java
3 /PreOSGi
8 /dev/selwakeup
9 /dev/wan/mac0
10 /dev/lan/sw0
11 /dev/lan/phy0
11 /dev/lan/phy1
11 /dev/lan/phy2
11 /dev/lan/phy3
12 /dev/wan/phy0
13 /dev/fastpath
2 /pipe/dhcp6cSignal
2 /pipe/dhcp6sSignal
14 /bpf/dhcps
14 /bpf/dhcpc/0
14 /bpf/dhcpc-arp
2 /pipe/lltd
2 /pipe/upnpGwSockMsg
2 /pipe/mldproxySignal
15 /ipsec
16 /ssh/wakeup
2 pQcNotif
3 /nfwdir
2 /pipe/jbedWakeUp
value = 25 = 0x19

ネットワークデバイスの一覧。

-> ifconfig
lo0: flags=c8249 mtu 1536
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.100 netmask 0xff000000
lan0: flags=68343 mtu 1500
inet6 fe80::20b:a2ff:fedb:50af%lan0 prefixlen 64 tentative scopeid 0x2
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:0b:a2:db:50:af
wan1: flags=28243 mtu 1500
inet6 fe80::20b:a2ff:fedb:50ae%wan1 prefixlen 64 tentative scopeid 0x3
ether 00:0b:a2:db:50:ae
ppp0: flags=390d1 mtu 1500
ppp1: flags=390d1 mtu 1500
ppp2: flags=390d1 mtu 1500
ppp3: flags=390d1 mtu 1500
ppp4: flags=390d1 mtu 1500
ppp5: flags=390d1 mtu 1500
ppp6: flags=390d1 mtu 1500
lan1: flags=e9143 mtu 1500
ether 00:0b:a2:db:50:af
lan2: flags=e9143 mtu 1500
ether 00:0b:a2:db:50:af
lan3: flags=e9143 mtu 1500
ether 00:0b:a2:db:50:af
lan4: flags=e9143 mtu 1500
ether 00:0b:a2:db:50:af
lan5: flags=e9143 mtu 1500
ether 00:0b:a2:db:50:af
pxy0: flags=8 mtu 1500
ssgw0: flags=40049 mtu 1500
inet 127.0.0.10 netmask 0xff000000
value = 0 = 0x0

ファイルシステムもあるが、ディレクトリをうまくたどれなかった。

-> pwd
/java/NFW/osap
value = 15 = 0xf
-> ls
.
..
config
args.txt
jvm_args
osap.policy
sys.properties
value = 0 = 0x0

0 件のコメント:

コメントを投稿