psdev02 bash:~>hostname
psdev02 bash:~>ls /cds/sw/tools/bin/netconfig
/cds/sw/tools/bin/netconfig
psdev02 bash:~>!$ --help
/cds/sw/tools/bin/netconfig --help
/cds/sw/tools/bin/netconfig: add a node to the lab network.
You must run this script BEFORE connecting the new node on the network.
Syntax: /cds/sw/tools/bin/netconfig
view <hostname> [ --subnet <subnet_name> ] [ --brief ]
search <pattern> [ --subnet <subnet_name> ] [ --brief ]
add [ <hostname> ]
[ --mac <mac_address> ] [ --ip <ip_address> ]
[ --alias <alias> [ --alias <alias> ... ]]
[ --add-alias <alias> ]
[ --delete-alias <alias> ]
[ --cname <cname> [ --cname <cname> ... ]]
[ --add-cname <cname> ]
[ --delete-cname <cname> ]
[ --dhcp-default-lease <def_time> ]
[ --dhcp-max-lease <max_time> ]
[ --dhcpopt <quoted_string> [ --dhcpopt <quoted_string> ]]
[ --puppetclass <string> [ --puppetclass <string> ]]
[ --pc <SLAC Property Control Number> ]
[ --location <Physical Location> ]
[ --manager <username> ] [ --info <info_string> ]
[ --subnet <subnet_name> ]
[ --console <console> ] [ --power <power_outlet> ]
edit [ <hostname> ]
[ --mac <mac_address> ] [ --ip <ip_address> ]
[ --dhcp-default-lease <def_time> ]
[ --dhcp-max-lease <max_time> ]
[ --dhcpopt <quoted_string> [ --dhcpopt <quoted_string> ]]
[ --delete-dhcpopt <quoted_string>]
[ --puppetclass <string> [ --puppetclass <string> ]]
[ --add-puppetclass <puppetclass> ]
[ --pc <SLAC Property Control Number> ]
[ --location <Physical Location> ]
[ --delete-puppetclass <puppetclass> ]
[ --manager <username> ] [ --info <info_string> ]
[ --monitgroup <monitgroup> [ --monitgroup <monitgroup> ... ]]
[ --subnet <subnet_name> ]
[ --console <console> ] [ --power <power_outlet> ]
[ --new-node-name <hostname> ]
del <hostname1> <hostname2> ... [ --subnet <subnet_name> ]
[ --noask ] [ --noprompt ] [ --batch ]
[ --debug ] [ --norestart ] [ --noemail ]
--help or -h
view: display the configuration of a host.
search: display the list of nodes that match <pattern> (any field).
Note: you can use wildcards on 'string' fields only!
add: add a new node, all necessary info can be specified on the command
line, otherwise the script will ask you to enter them.
edit: edit a node. All info specified on the command line will be edited.
del: remove one or multiple nodes and free their associated ressources.
<hostname>: name of the host to add, edit or remove.
--cname <cname>: any other DNS name you want this host to be recognized under.
There can be as many as you want (beware of naming conflicts !)
Each cnames must be preceeded by an --cname switch.
--add-cname <cname>: Add a new cname to a node.
--alias <alias>: any unofficial name you want this host to be recognized under.
There can be as many as you want (beware of naming conflicts !)
Each aliases must be preceeded by an --alias switch.
--add-alias <alias>: Add a new alias to a node.
--add-puppetclass <puppetclass>: add host to a Puppet Class.
--batch: If set interactive mode is disabled.
--brief: If set, view and search will only show hostname.
config files and restart services.
--console <console>: terminal server port to which this node console is
connected. <console> should be <terminal_server>:<port#>.
--debug: Report more info when something goes wrong.
To be use in the edit mode only. Ignored in add mode.
--delete-alias <alias>: Delete an alias from a node.
--delete-cname <cname>: Delete an cname from a node.
--delete-puppetclass <puppetclass>: delete host from a Puppet Class.
--dhcp-default-lease <def_time>: default lease time.
--dhcp-max-lease <max_time>: maximum lease time.
--dhcpopt <quoted_string>: string to give to the DHCP server for
--delete-dhcpopt <quoted_string>: delete DHCP option
--ip <ip_address>: IP address of the node.
--info <info_string>: description of the host.
--manager <username>: user responsible for this host. This user must be
--monitgroup <monitgroup>: Monit Group used for ping and ssh checks
--noask: If set interactive mode is disabled.
--noemail: To prevent email from being sent to the admins.
--norestart: Only modify the LDAP database, does not re-generate
--noprompt: If set interactive mode is disabled.
known of the LDAP database.
--power <power_outlet>: controllable power outlet to which this node is
connected. <power_outlet> should be <power_outlet>:<outlet#>.
--puppetclass <puppetclass>: Puppet Class to add a host to.
This switch is used if the host is not alrady in any class
Otherwise, --add-puppetclass shoould be used.
Can be used multiple times.
Each Puppet Classes must be preceeded by a --puppetclass switch.
--subnet <subnet_name>: subnet name
if you don't know on which network your host should be,
reach out to Slack #pcds-help, or contact pcds-it-l@slac.stanford.edu.
--help or -h: Display this message.
psdev02 bash:~>