./Linux/sendcmd -p port -c cmd ... ----------------------- General arguments ------------------------------------- -p port = The port you want to send a control message to -G flag = Command Header flags: (cancel or next) -t timeout = Receive timeout in msecs ----------------------- Verbose Message Control ------------------------------- -v = Verbose, -V = a Louder verbose -w level = (loud, verbose, info, warning, error, critical, off) ----------------------- Arbitrary data, 32 bit words -------------------------- -d data = data sent with command. Arg ordering matters. -n addr = interpret addr as a dotted ip addr. -------------------- Options for PCU and Classifier sub-commands -------------- -F flags = Gate Flags: USED = 0x01, STOP = 0x02, COPY = 0x04, ALL = 0x08 -i id = Class or Instance id, see commands below for context Note: -F and -i not be used simultaneously. Both occupy word 1 of msg body. -f fid = Filter ID -g type = Classifier ID: General Match = 0, Exact Match = 1 ----------------------- Commands and Sub-Commands ----------------------------- -s subcmd = Sub command, see the list of commands below, -c cmd = The MSR command to execute, see below for valid strings: --> MSR Port Command Set: null - Null Command set_debug - Set the current debug flags (level and modules) get_debug - Get the current debug flags port_init - Init port: -d flags (OR of {0x1:FPX, 0x2:GIGI, 0x4:SPCII}) port_up - Command port to begin/resume forwarding packets port_down - Command port to stop forwarding packets policy - Set policy, requires subcommand. --> Sub Commands: null - Null Command get_iprt - Get policy iprt type flag set_simple - Set policy iprt type to Simple (disables fipl) set_fipl - Set policy iprt type to ifpl (disables simple) set_dflags - Set where debug msgs are sent (local -d 1, remote -d 2, both -d 3) get_dflags - Get policy dflags value get_ps - Packet Scheduler (0-None, 1-fcfs, 2-qsdrr, 3-other) set_ps - Packet Scheduler [-d ps (0-None, 1-fcfs, 2-qsdrr, 3-other) get_flags - Return all control flags set_flags - Set all control flags -d 0x-------- set_grate - Set the global pacing rate [-d rate_Kbps] get_grate - Return rate settings [GlobalMax, G, L, S, S*L] set_trate - Set rates, two must be nonzero [-d trate (Kbps) -d L (Kbps) -d S (Percent)] get_trate - Return rate settings [grate, trate, extrate, speedup, intrate set_pkts - Set PS buff allocations, -d cnt -d mode [-d mtu]. mode: 0 %, 1 Count, 2 Bytes get_pkts - Returns (Total Buffs, Max PS Pkts, Max DQ Pkts, Max PS Bytes, PS Percent) dq - Send command to the DQ module --> Sub Commands: null - Null or no-op command. Used to verify connetivity start - Start DQ running stop - Stop DQ set_params - Set dqAlg, C, Xbeta, minRate get_params - Get dqAlg, C, Xbeta, minRate set_ports - Set active ports list get_ports - Return the list of active ports fipl - Not Implemented: FIPL rp_pcu - Plugin Control Unit, requires subcommand --> Sub Commands: null - Null Command allocate - Allocate memory for plugin using LKM load - Complete load of plugin unload - Unload plugin and free memory stat - NI: Report the status of all active plugins create - Create: class id free - Free: instance id bind - Bind (<= 5/fltr): instance id, gate id, filter id unbind - UnBind: instance id, gate id, filter id clist - List loaded classes, sent to port syslogd ilist - List instances, list sent to port syslogd addfltr - Depricated remfltr - Depricated flist - Depricated rp_inst - Send to plugin instance, include instance ID rp_class - Send to plugin class, include class ID apic - Send to APIC driver, include sub-command --> Sub Commands: invalid - Invalid Flag info - Print APIC information resume - Resume APIC TX channel (-d cid -d flags [BE 1, Paced 2, LD 3]) desc - Print desc (-d indx -d flags [desc 01, buff 02, ip 04]) pace - Set channel pacing (-d cid -d percent) gpace - Set global pacing (-d pacing_value) stats - Report Port Statistics --> Sub Commands: invalid - Invalid Cmd get_all - Print all statistics get_fpx - Print fpx statistics get_rxtx - Print rxtx statistics get_errs - Print error/drop statistics reset - Reset all stats to zero perf - Not Implemented: cfy - Use the cfy command - not sendcmd --> Sub Commands: null - Null or no-op command. Used to verify connetivity addfltr - Add a new filter spec remfltr - Remove filter: must specify type (-c) and filter id (-f) flist - List all installed filters of type em or gm (-c em|gm) info - Print the list of active classifier entries pktcnt - Return the packet count for a filter (use fid or 5-tuple) dchan - Commands to control the Control Data Channels --> Sub Commands: invalid - Invalid Cmd get - get a new data channel release - release an allocated data channel list - list all allocated data channels ps - Commands for instantiated packet scheduler --> Sub Commands: null - Null command - used as a ping get_state - Return PS global state, no arguments get_qlen - Return length of specific queue (-d qid) and global state get4qlen - Return len of 4 Qs (-d qid -d qid -d qid -d qid) and IDs of L,S,D Qs get_qids - Return all active qids (limit 19), no arguments lfs - LFS Commands --> Sub Commands: null - Null command - used as a ping get_res - Return a list of the active LFS reservations get_fcnt - Returns the number of active LFS flows get_all - makes copy of flow list, then return one at atime get_flow - Returns the n'th flow (-d n), 0 if not valid index ----------------------- Arguments for debug commands -------------------------- -l level = Debug level, used with set_debug command. Levels: Valid Debug Levels: verbose - Gratuitous messages info - Information messages trace - Trace packets warn - Warnings messages error - Error messages critical - Critical messages -m module = Debug category, used with set_debug command. Modules: Valid Debug Modules: all - All modules null - Invalid module apic - APIC specific code ipfwd - IP Forwarding code ingress - IP Ingress specific processing egress - IP Egress specific processing iprx - Driver code handling Rx of IP packets iptx - Driver code handling Tx of IP packets mem - MSR buffer and memory management dq - Distributed Queuing stats - MSR Module handling statistics ctl - MSR Module handling control functions conf - MSR Module handling configuration functions kern - MSR Module handling core functions natm - MSR Module handling natm (AAL0) functions pcu - PCU module plugin - Plugin classify - Gate and Filter module for management perf - Performance measurement hooks atmrx - APIC RX of IP packets atmtx - APIC TX of IP packets buff - Packet Buffer and related descriptor manipulation lfs - Lightweight Flow Service fpx - FPX Note: for filters use hex values or IP addrs with the following syntax -n saddr -n smask -d sport -n daddr -n dmask -dport -d proto For example to get all pkts from subnet 192.168.200.0: -n 192.168.200.0 -n 255.255.255.0 -d 0 -d 0 -d 0 -d 0