Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

sysctl() Function (Python, SLAX, and XSLT)

Namespaces

Python Syntax

SLAX Syntax

XSLT Syntax

Description

Return the given sysctl value.

Python scripts require you to specify the return value's type. However, the type argument is optional in SLAX and XSLT scripts. In Junos OS, use 'i' to specify an integer, and use 's' to specify a string. In Junos OS Evolved, you should only use 's'.

The prefix associated with the namespace URI should be defined in the prefix-to-namespace mapping in the style sheet.

Parameters

sysctl-value

Name of the sysctl value to return, for example, kern.hostname on Junos OS or kernel.hostname on Junos OS Evolved.

Return Value

value

Returned string or integer value.

Usage Examples

jcs:sysctl() Function (Junos OS)

jcs:sysctl() Function (Junos OS Evolved)

Release Information

Function introduced in Junos OS Release 7.6

Support for the slax namespace http://xml.libslax.org/slax added in Junos OS Release 12.2.

Support for Python added in Junos OS Release 16.1R1.