Solaris

Solaris knowledge

To check current DNS config, run root@solaris1 :/root # svccfg -s svc:/network/dns/client setprop config/nameserver = net_address: (172.16.8.3 172.16.8.4) setprop config/search = astring: "example.com domain.company.com subdomain.company.com" setprop config/domain = astring: "domain.company.com" exit root@solaris1 :/root # From man resolv.conf we can check how to update any parameter like root@solaris1 :/root # svccfg -s svc:/network/dns/client \fR setprop config/search = astring: us.example.com Read more...
If we have to send a BREAK command to a Solaris T5-8 (or any Solaris with Service Processor), it can be achieved with SSH to the service procesor of the physical machine. Send the BREAK command by set Connect to the console to finally answer if we want to allow the BREAK. -> set /HOST send_break_action=BREAK Set 'send_break_action' to 'BREAK' -> start /SP/console Are you sure you want to start /SP/console (y/n)? y Serial console started. To stop, type #. c)ontinue, Read more...
Screen is the best software used for full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells using only one SSH sesion or only one console. Getting in Escape key All screen commands are prefixed by an escape key, by default C-a (that's Control-a, sometimes written ^a). To send a literal C-a to the programs in screen, use C-a a. This is useful when when working with screen within screen. For example C-a a n will move screen to a Read more...
For a clean output on the IP address for nslookup, create a file with the list of hosts be lookup and run: # for i in `cat /tmp/list`; do echo -n $i": " ; getent hosts $i | awk '{ print $1 }'; done To see the memory consuption in Solaris # vmstat 1 2 |tail -1 | awk '{ print $5/1024, "MB"}'   To run a list of commands (i.e. over SSH) for i in `cat file.host.list` ; do ssh -o ConnectTimeout=5 $i "$(<cmd.txt)" 1>> output.out; done Where cmd.txt contains a list of commands separated Read more...
When connecting over ssh to a server with Putty, we can easily export the DISPLAY and run any X-Window application after enable the X11 in the PuTTY configuration. However, if you change to another account  any X-Window application will fail as we have to share the MIT-MAGIC Cookies from the first user connected, here is how we can do it. user1@server3$ echo $DISPLAY localhost:10.0 user1@server3$ xauth list server3/unix:10 MIT-MAGIC-COOKIE-1 6586998224e70480f72d195f55191dc4 server3/unix:11 Read more...