Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

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 OS CLI operational mode commands:

user@host> show task user@host> show task memory user@host> show task task-name

Sample Output

user@R1> show task
Pri Task Name                           Pro  Port So Flags
 10 LMP Client                              17 <>
 10 IF
 15 INET6
 15 INET
 15 ISO
 15 Memory
 20 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 Aggregate
 20 RT
 30 ICMP                                  1
 30 Router-Advertisement
 30 ICMPv6                               58  9 <>
 39 OSPFv2 I/O./var/run/ppmd_control              12 <>
 40 l2vpn global task
 40 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                                 89
 50 BGP_65001.10.0.0.5+3531                  3531 18 <LowPrio>
 50 BGP_65002.10.1.12.2+1224                 1224 25 <LowPrio>
 50 BGP_Group_internal                         <LowPrio>
 50 BGP_Group_toR2                             <LowPrio>
 50 TED
 50 ASPaths
 51 Resolve inet.0                             <LowPrio>
 60 KStat                                   13 <>
 60 KRT Request                              7 <>
 60 KRT Ifstate                         255  6 <>
 60 KRT                                 255  5 <>
 60 Redirect
 70 MGMT.local                                    24 <>
 70 MGMT_Listen./var/run/rpd_mgmt                 14 <Accept>
 70 SNMP Subagent./var/run/snmpd_stream           10 <>
 80 IF Delete
user@R1> show task memory
Memory                 Size (kB)  Percentage  When
  Currently In Use:         3490          1%  now
  Maximum Ever Used:        3535          1%  04/02/04 11:54:46
  Available:              220623        100%  now

user@R1> show task io
Task Name                         Reads  Writes    Rcvd    Sent Dropped
 LMP Client                           1       1       0       0       0
 IF                                   0       0       0       0       0
 INET6                                0       0       0       0       0
 INET                                 0       0       0       0       0
 ISO                                  0       0       0       0       0
 Memory                               0       0       0       0       0
 RPD Unix Domain Server./var/ru       1       0       0       0       0
 RPD Unix Domain Server./var/ru       1       0       0       0       0
 RPD Unix Domain Server./var/ru       0       0       0       0       0
 RPD Unix Domain Server./var/ru       3       0       0       0       0
 RPD Server.0.0.0.0+666               0       0       0       0       0
 Aggregate                            0       0       0       0       0
 RT                                   0       0       0       0       0
 ICMP                                 0       0       0       0       0
 Router-Advertisement                 0       0       0       0       0
 ICMPv6                               0       0       0       0       0
 OSPFv2 I/O./var/run/ppmd_contr   31167       1       0       0       0
 l2vpn global task                    0       0       0       0       0
 BGP RT Background                    0       0       0       0       0
 BGP.::+179                           0       0       0       0       0
 BGP.0.0.0.0+179                      8       0       0       0       0
 BFD I/O./var/run/bfdd_control    30731       1       0       0       0
 OSPF                                 0       0       0       0       0
 BGP_65001.10.0.0.5+3531          20486       0       0       0       0
 BGP_65002.10.1.12.2+1224         20489       6       0       0       0
 BGP_Group_internal                   0       0       0       0       0
 BGP_Group_toR2                       0       0       0       0       0
 TED                                  0       0       0       0       0
 ASPaths                              0       0       0       0       0
 Resolve inet.0                       0       0       0       0       0
 KStat                                0       0       0       0       0
 KRT Request                          0       0      57       0       0
 KRT Ifstate                         18       0      16       0       0
 KRT                                  0       0       2       0       0
 Redirect                             0       0       0       0       0
 MGMT.local                           0       0       0       0       0
 MGMT_Listen./var/run/rpd_mgmt       23       0       0       0       0
 SNMP Subagent./var/run/snmpd_s      23       0       0       0       0
 IF Delete                            0       0       0       0       0

Meaning

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, the BGP_Group_internal task is the result of the configuration of BGP on the router, while the INET6 task is a base task associated with the routing process (rpd).

Each task in the show task command output has a priority and a task name. For example, the current priority is 10 for LMP Client and 80 for IF Delete. A lower number indicates a higher priority.

Some tasks have flags attached to them. For example, the BGP.0.0.0.0+179 task has two flags, Accept and LowPrio. The Accept flag indicates that the task is waiting for incoming connections, and the LowPrio flag indicates that the task will be dispatched to read its socket after other, higher priority tasks. Two additional flags are Connect, which indicates that a task is waiting for a connection to complete, and Delete, which indicates that a task has been deleted and is being cleaned up.

The show task io command 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.

Published: 2012-12-10

Published: 2012-12-10