Step 3: Display Tasks
Purpose
You can display information about tasks to further your investigation of a memory problem on the router.
Action
To display a list of tasks that are enabled on the router, enter the following JUNOS CLI operational mode commands:
user@host>show taskuser@host>show task memoryuser@host>show tasktask-nameSample Output
user@R1>show taskPri Task Name Pro Port So Flags10 LMP Client17 <>10 IF15 INET615 INET15 ISO15 Memory20 RPD Unix Domain Server./var/run/rpd_serv.local 21 <>20 RPD Unix Domain Server./var/run/rpd_serv.local 20 <>20 RPD Unix Domain Server./var/run/rpd_serv.local 19 <>20 RPD Unix Domain Server./var/run/rpd_server_communication 16 <Accept>20 RPD Server.0.0.0.0+666 666 15 <Accept>20 Aggregate20 RT30 ICMP 130 Router-Advertisement30 ICMPv6 58 9 <>39 OSPFv2 I/O./var/run/ppmd_control 12 <>40 l2vpn global task40 BGP RT Background <LowPrio>40 BGP.::+179 179 23 <Accept LowPrio>40 BGP.0.0.0.0+179 179 22 <Accept LowPrio>40 BFD I/O./var/run/bfdd_control 11 <>40 OSPF 8950 BGP_65001.10.0.0.5+3531 3531 18 <LowPrio>50 BGP_65002.10.1.12.2+1224 1224 25 <LowPrio>50BGP_Group_internal<LowPrio>50 BGP_Group_toR2 <LowPrio>50 TED50 ASPaths51 Resolve inet.0 <LowPrio>60 KStat 13 <>60 KRT Request 7 <>60 KRT Ifstate 255 6 <>60 KRT 255 5 <>60 Redirect70 MGMT.local 24 <>70 MGMT_Listen./var/run/rpd_mgmt 14 <Accept>70 SNMP Subagent./var/run/snmpd_stream 10 <>80 IF Deleteuser@R1>show task memoryMemory Size (kB) %Available WhenCurrently In Use: 3490 1% nowMaximum Ever Used: 3535 1% 04/02/04 11:54:46Available: 220623 100% nowuser@R1>show task ioTask Name Reads Writes Rcvd Sent DroppedLMP Client 1 1 0 0 0IF 0 0 0 0 0INET6 0 0 0 0 0INET 0 0 0 0 0ISO 0 0 0 0 0Memory 0 0 0 0 0RPD Unix Domain Server./var/ru 1 0 0 0 0RPD Unix Domain Server./var/ru 1 0 0 0 0RPD Unix Domain Server./var/ru 0 0 0 0 0RPD Unix Domain Server./var/ru 3 0 0 0 0RPD Server.0.0.0.0+666 0 0 0 0 0Aggregate 0 0 0 0 0RT 0 0 0 0 0ICMP 0 0 0 0 0Router-Advertisement 0 0 0 0 0ICMPv6 0 0 0 0 0OSPFv2 I/O./var/run/ppmd_contr 31167 1 0 0 0l2vpn global task 0 0 0 0 0BGP RT Background 0 0 0 0 0BGP.::+179 0 0 0 0 0BGP.0.0.0.0+179 8 0 0 0 0BFD I/O./var/run/bfdd_control 30731 1 0 0 0OSPF 0 0 0 0 0BGP_65001.10.0.0.5+3531 20486 0 0 0 0BGP_65002.10.1.12.2+1224 20489 6 0 0 0BGP_Group_internal 0 0 0 0 0BGP_Group_toR2 0 0 0 0 0TED 0 0 0 0 0ASPaths 0 0 0 0 0Resolve inet.0 0 0 0 0 0KStat 0 0 0 0 0KRT Request 0 0 57 0 0KRT Ifstate 18 0 16 0 0KRT 0 0 2 0 0Redirect 0 0 0 0 0MGMT.local 0 0 0 0 0MGMT_Listen./var/run/rpd_mgmt 23 0 0 0 0SNMP Subagent./var/run/snmpd_s 23 0 0 0 0IF Delete 0 0 0 0 0What It Means
The sample output shows a list of routing, routing protocol, and interface tasks that are currently running on the router (
show task), a summary of memory utilization (show task memory), and the memory utilization of a particular task (show task io). Tasks can be baseline tasks performed regardless of the router configuration, and other tasks that depend on the router configuration. For example, theBGP_Group_internaltask is the result of the configuration of BGP on the router, while theINET6task is a base task associated with the routing process (rpd).Each task in the
show taskcommand output has a priority and a task name. For example, the current priority is 10 forLMP Clientand 80 forIF Delete. A lower number indicates a higher priority.Some tasks have flags attached to them. For example, the
BGP.0.0.0.0+179task has two flags,AcceptandLowPrio.TheAcceptflag indicates that the task is waiting for incoming connections, and theLowPrioflag indicates that the task will be dispatched to read its socket after other, higher priority tasks. Two additional flags areConnect, which indicates that a task is waiting for a connection to complete, andDelete, which indicates that a task has been deleted and is being cleaned up.The
show task iocommand shows the statistics gathered for each IO operation. The counters show the following:
Reads—This counter increments when a datagram arrives on a connected socket of the task and the task's read callback is called.Writes—This counter increments when a connected socket of a task becomes writable and the tasks's callback is called.Rcvd—This counter increments when the task calls the Routing Engine to read a datagram from a socket which may or may not be connected.Sent—This counter increments when a task attempts to read or write a datagram on an existing or nonexisting socket.Drops—This counter increments when a task attempts to read or write a datagram through the Routing Engine on a prebuilt socket, but the request fails for any reason.