Oct 10, 2009

10 Very important tips and tricks in solaris

1.How to disable the Stop-A key on a Sun box without touching the keyswitch?

  Enter the following line into /etc/system and reboot:
        set abort_enable = 0
The Stop-A key will be disabled

2.How to check cron jobs are running OK?

We can check the following 2 files
    1./var/cron/log     (cron history information)
    2./var/cron/olog    (moves log file to /var/cron/olog if log  
                                file exceeds system limit)

The output of the following files looks like the following

>  root 17659 c Sun May 20 04:00:00 2007
>  CMD: /usr/sbin/chkrootsmc
>  root 17662 c Sun May 20 04:00:00 2007
<  sys 17658 c Sun May 20 04:00:00 2007
<  root 17659 c Sun May 20 04:00:00 2007 rc=137
<  root 17662 c Sun May 20 04:00:00 2007
>  CMD: /usr/sbin/chkrootsmc
>  root 17712 c Sun May 20 04:05:00 2007
<  root 17712 c Sun May 20 04:05:00 2007
>  CMD: /usr/sbin/syscheck
>  root 17754 c Sun May 20 04:10:00 2007
>  CMD: /usr/sbin/chkrootsmc
>  root 17755 c Sun May 20 04:10:00 2007
<  root 17755 c Sun May 20 04:10:00 2007

3.How to check number of inodes used by a ufs file system?

To check the number of inodes used and free by a file system use the following command

df –k  –F ufs  -o i

The output will be like the following

root@itd-smc # df -F ufs -o i
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c0t0d0s0     184738  596830    24%   /
/dev/dsk/c0t0d0s3        641  780927     0%   /data
/dev/dsk/c0t0d0s4      64103  458777    12%   /web
/dev/dsk/c0t0d0s5      51095  384489    12%   /oramteam

If we run out of inodes in a filesystem, even if we have free space, we will not be able to create additional files.

4.How to unplug a keyboard from arunning machine?

To change it from the command line before we pull the keyboard out, we have totype the following as root:

    # kbd -a disable

When we've reconnected the keyboard to the host,we have to type:

      # kbd -a enable

5.How to disable the power/suspend key?

We have to renamethe file in:
   /usr/openwin/bin/speckeysd
like
   /usr/openwin/bin/speckeysd.old
and reboot the system and the power/suspend key will be disabled

6.Smallest command in unix
W  -  The w command displays a summary of the current activity  on
          the  system,  including what each user is doing.

7.How can I find out if the OS has been configured to run in ?
32 bit or 64 bit Mode?

On a 32 bit machine
-------------------
# isainfo -v
32-bit sparc applications

On a 64 bit machine
-------------------
# isainfo -v
64-bit sparcv9 applications
32-bit sparc applications

8.Command to determine the booted disk.

# prtconf -vp | grep bootpath

The output will be like the following
bootpath:  '/pci@1f,0/pci@1,1/ide@3/disk@0,0:a'

9.How to change the banner of the telnet daemon when logging in?

To set the banner, add a line of the form:

BANNER="..."

to /etc/default/telnetd
The writing in the double quotes will be printed when logging in.
No banner will be printed if /etc/default/telnetd contains:
BANNER=" "

10.How to change the banner of the FTP daemon when logging in

To set the banner , add a line of the
form

BANNER="..."

to /etc/default/ftpd.
The writing in the double quotes will be printed when logging in.
no banner will be printed if /etc/default/ftpd  contains
BANNER=" "

Related Posts:

  • Tips & Tricks for SQUID (Proxy) ServerOverview This article will be helpful to improve your squid performance in any hectic and slow bandwidth / traffic kind of scenario. This will also helpful to the organization, who will use the only one Squid Server Hardware… Read More
  • Top 10 Blackberry Troubleshooting TipsIntroduction Use this article to resolve a problem involving or relating to the BlackBerry wireless device, before engaging the help of your BlackBerry technical support provider. Troubleshooting Tips Tip 1 Check the si… Read More
  • CSS Best Practices and Cross-browser CompatibilityThis article is consolidation of the best practices which are followed or taken care during the development when a web page is styled using a external or inline style sheet referred to as CSS (Cascading Style Sheet). The best… Read More
  • SSH configuration in Solaris 8Configuring OpenSSH on Solaris 8 Solaris 8 doesn’t come with the SSH and SFTP like features, to enable these we have to configure and install a third party package OpenSSH. /dev/random and /dev/random built-in, but patches… Read More
  • DB2 Tuning Tips1) Take out any / all-Scalar functions coded on columns in predicates. For example, this is the most common: SELECT EMPNO, LASTNAMEFROM EMPLOYEEWHERE YEAR(HIREDATE) = 2005Should be coded as:SELECT EMPNO, LASTNAMEFROM EMPLOYE… Read More

0 comments:

Text Widget

Copyright © 2025 Vinay's Blog | Powered by Blogger

Design by | Blogger Theme by