Description

This article describes the command to check which session ID or which user is editing the configuration.

Solution

The below command is available from 23.3R1 onwards.

show system configuration database status 

 

https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/command/show-system-configuration-database-status.html

 

Sample output:

 

labroot@qfx> show system configuration database status  

Users currently editing the configuration:

 labroot terminal pts/1 (pid 18871) on since 2025-01-12 06:20:10 JST

  exclusive {master:0}[edit]

 

 

Until the device is upgraded to the said version, you can use the netconf rpc <get-database-status-information> to check without logging into the configuration mode.

 

1. Start netconf on Junos (this is a hidden command):

lab@qfx> junoscript netconf interactive

 

2. Issue the XML RPC commands (to get user information):

 

<rpc>

 <get-database-status-information/>

</rpc>

 

Sample output:

 

<rpc>

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/21.4R0/junos">

 <get-database-status-information/>

<user>labroot</user>

<terminal>pts/1</terminal>

<pid>12380</pid>

<start-time junos:seconds="1736627154">2025-01-12 05:25:54 JST</start-time>

<idle-time junos:seconds="45">00:00:45</idle-time>

<exclusive/>

<edit-path>{master:0}[edit]</edit-path>

</database-status>

</database-status-information>

<rpc> 

 

 

3. End your session:

 

<rpc>

  <request-end-session/>

 

Try getting into the configure exclusive mode to verify the user PID using exclusive mode.

 

lab@qfx> configure exclusive 

error: configuration database locked by:

 labroot terminal pts/1 (pid 12380) on since 2025-01-12 05:25:54 JST, idle 00:02:03

  exclusive {master:0}[edit]

Modification History

2024-07-20 - Initial Publication