; ; @ANO_SCRIPT_NAME node_info ; @ANO_SCRIPT_VERSION 0.0.1 ; @ANO_SCRIPT_DESCRIPTION Simple node info fetcher example ; ; @ANO_FLAGS_USE_PROTOS [ ] ; @ANO_FLAGS_VAR_NAME_SUBS [ ] ; @ANO_FLAGS_VAR_WARN_UNUSED [ ] ; ; Copyright (c) 2016-2026, Jani Salonen ; All rights reserved. ; ; This example fetches some info about underlying machine and user starting ; this program. ; main [exit: 0] { print "\nSystem information\n" print "------------------\n\n" ; Get machine info... ; _host_name = node_get_hostname _host_id = node_get_hostid print "Hostname: " . _host_name . "\n" print "Host id: " . _host_id . "\n\n" _system = node_get_system _release = node_get_release _machine = node_get_machine print "System: " . _system . "\n" print "Release: " . _release . "\n" print "Machine: " . _machine . "\n\n" ; ...and user info as well. ; _user_name = node_get_username _group_name = node_get_groupname _user_id = node_get_userid _group_id = node_get_groupid _home_dir = node_get_homedir _gecos = node_get_gecos print "User name: " . _user_name . ", id: " . _user_id . "\n" print "Primary group: " . _group_name . ", id: " . _group_id . "\n" print "Home directory: " . _home_dir . "\n" print "Gecos info: " . _gecos . "\n\n" }