| 1 |
# $id$ |
| 2 |
|
| 3 |
sercmd usage examples |
| 4 |
|
| 5 |
|
| 6 |
help: |
| 7 |
sercmd -h |
| 8 |
|
| 9 |
use an udp ser control socket: |
| 10 |
ser config: |
| 11 |
loadmodule "modules/ctl/ctl.so" |
| 12 |
modparam("ctl", "binrpc", "udp:localhost:2046") |
| 13 |
modparam("ctl", "binrpc", "tcp:localhost:2046") |
| 14 |
modparam("ctl", "binrpc", "unixs:/tmp/unix_stream") |
| 15 |
modparam("ctl", "binrpc", "unixd:/tmp/unix_dgram") |
| 16 |
|
| 17 |
sercmd: |
| 18 |
sercmd -s udp:localhost:2046 core.version |
| 19 |
|
| 20 |
use a tcp socket: |
| 21 |
sercmd -s tcp:localhost:2046 core.version |
| 22 |
|
| 23 |
use a stream unix socket: |
| 24 |
sercmd -s unixs:/tmp/unix_stream core.version |
| 25 |
|
| 26 |
use a datagram unix socket: |
| 27 |
sercmd -s unixd:/tmp/unix_dgram core.version |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
list available commands on ser side: |
| 32 |
sercmd -s unixd:/tmp/unix_drgam ls |
| 33 |
|
| 34 |
list all available commands (including sercmd builtins or aliases): |
| 35 |
sercmd -s unixd:/tmp/unix_dgram ? |
| 36 |
or |
| 37 |
sercmd -s unixd:/tmp/unix_dgram help |
| 38 |
|
| 39 |
get help on one command: |
| 40 |
sercmd -s unixd:/tmp/unix_dgram help core.ps |
| 41 |
|
| 42 |
list ser processes: |
| 43 |
sercmd -s unixd:/tmp/unix_dgram ps |
| 44 |
|
| 45 |
send an rpc command to ser: |
| 46 |
sercmd -s unixd:/tmp/unix_dgram core.shmmem |
| 47 |
|
| 48 |
format the output: |
| 49 |
sercmd -s unixd:/tmp/unix_dgram -f 'pid:%v desc:"%v"\n' core.ps |
| 50 |
(note: you could use just ps instead of core.ps) |
| 51 |
|
| 52 |
format the output as csv: |
| 53 |
sercmd -s unixd:/tmp/unix_dgram -f '%v,' core.ps |
| 54 |
|
| 55 |
enter interactive mode: |
| 56 |
sercmd -s unixd:/tmp/unix_dgram |
| 57 |
(note: type help,or ? to see the command list, tab expansion should also |
| 58 |
work) |
| 59 |
|