__________________________________________________________________________________________
PAC-4010 User Manual V1.0 Copyright 2016 Advantech Co. Ltd. All rights reserved. Page
81
Below are few command examples:
$/opt/sdk-xgs-robo/bcmsh -c “ps”> /tmp/sw0_port_stats.log # save port status to a file
$/opt/sdk-xgs-robo/bcmsh -c “ps xe0”&>/dev/null; [ $? -eq 0 ] && echo “xe0 exists” #
check port existence
$ssh user@mydevice.somewhere ‘/opt/sdk-xgs-robo/bcmsh -c“port xe0 enable=
false”’ # disable a port remotely
Meanwhile, BCMSH can support execute multiple SDK commands in parallel by using
“-c”
or
“-f”
option along with
“-s <session>”
option. The
“<session>”
, which ranges
from 0 to 9, denotes the identifier of one of ten additional background execution
threads. The behavior is: when
“-s”
option is specified, the default execution thread will
redirect the incoming command to specific thread denoted by
“<session>”
via POSIX
message queue. After the command redirection, the default execution thread goes
back and continues to monitor command FIFO immediately.
Note!
With “-s” option, BCMSH is not able to get output string or return code of
individual command. Please excise the command or script carefully before
you decide to specify “-s” option.
5.9 FRU Detect Daemon
The section describes the daemon called
“FRU Detect Daemon”
. This daemon is
designed to get the present FRU of PMMs and interposer boards. The daemon is
installed in
“/opt/fru-db”
of target file system and named
“fru-poll.sh”
.
The congiraution file
“pmm-fru.conf”
is for FRU access reference. The daemon will
poll the FRU data of PMMs and interposer boards periodically. If the PMM is plugged in,
the database files will be generated. If the PMM is plugged out, the databases files will
be removed.
For the purpose to detect FRU of PMMs and interposer boards there is another launch
script named
“fru-polld”
in
“/etc/init.d”
of target file system.
Below is an example to run the launch script:
$/etc/init.d/fru-polld start
The FRU database files will be used to check which type of PMM module plug in or out.
The plug-in-and-play daemon for PMM module can refer to the FRU database files.
Other daemons can use the database to distinguish plug status and type for their
process execution. There are three kinds of database files include binary code, human
readable format and brief type information.
The database files will be also generated in
“/opt/fru-db”
of target file system after the
daemon detect and read the FRU data of PMMs and interposer boards.
Summary of Contents for PAC-4010
Page 2: ......