Skip to main content

Posts

Showing posts from 2020

Syslog in Solaris

 Syslog is system messaging feature  which takes system activities and  events which can be helpful for an administrator to maintain the system  and  for troubleshooting tasks. Daemon : Syslogd Database Files: /etc/syslog.conf : This file contains two different fields. a). Selector  b). Action a. Selector: It specifies that at which     event system report is to be generated.    It is sub-divided into two parts:     1. Facility : It specifies report         generation based on activities         in regards to user process,mail-system        ,authorisation process,daemons,        scheduler facilities etc.           2. Level : It defines importance of message         system task.There are various levels such as         Emerg for panic conditions , Crit for critic...

Core Dump and Crash Dump Solaris

Crash Dump : When an operating system  or system hardware has an error (fatal) system generates crash dump. Core Dump : When any user process or application has an error system generates core dump. Note: When an operating system crashes, the save core command runs automatically during the first boot. This command retrieves the crash dump from the dump device [by default partition] and then writes crash dump to the file at the following  location i-e  /var/crash/hostname/file Crash Dump saves Kernel core information in the below mentioned file i-e /var/crash/hostname/vmcore.x and it saves name list information along with symbolic information in the  below file i-e /var/crash/hostname/unix.x Note: Within the crash dump directory file named as "Bounds" is created  automatically when dumping happens  for the first time. This file holds a number that is used as suffix for the next dump  to be set.This dump is used by root administrator for system problem...

Autofs In Solaris

If remote share information is specified in  /etc/vfstab file located at nfs client then  whenever nfs client boots it runs mountall  command and tries to mount all local as well as remote file systems.If remote server is down nfs client fails to mount the file system  specified in /etc/vfstab file. Autofs allows to automatically mount remote  file systems when remote server comes up. The daemon associated with autofs service  is auotmountd. The database files that holds the automount info are : 1. /etc/auto_master : It contains mount points    with maps. 2. /etc/auto_home : It contains indirect maps    for the home directory across the network. 3. /etc/auto_direct : This file is not available     by default , it has to be created and it     contains directory maps of network shares. Autofs can only be configured at client side.

NFS in Solaris

NFS i-e Network File System is used to share data, printer, storage etc across unix systems. Daemons that a NFS file system uses. 1. mountd : It does access control and handles       file systems mount request from remote      client. 2. nfsd : It handles client file systems request. 3. stated : It works with lockd daemon to  provide crash recovery function. 4. lockd : It does record locking operations on     nfs files. 5. nfs lockd : It provides operational login. The Database Files associated with Network file  system are : 1. /etc/dfs/dfstab : It lists local resources to be      shared. 2. /etc/dfs/sharetab : It lists local resources     that are currently being shared by the nfs      server. 3. /etc/dfs/fstype : It lists default file system      types for remote file system. 4. /etc/mnttab : It contains list of file systems     currently mounted on local syste...

Permanent File System Mounting in Solaris

To mount a file system permanently on a solaris system in such a  way that it sustains a reboot is by adding the file system to a particular file that is read by the system after a reboot/startup . The file associated with permanent mounting is /etc/vfstab. There are 7 fileds in /etc/vfstab. 1. Device to mount : Here we need to specify      the full path of the block special     device to mount.     for eg: /dev/dsk/c0t0d0s5 2. Device to Fsck : In this field we need to     specify the raw  device name.     for eg: /dev/rdsk/c0t0d0s5 3. Mount Point : Here we need to specify the     mount point created for the device.     4. FS Type : Here we need to specify the file     system type.If it is unix file system then      ufs or zfs. If it is network file system then     nfs. If you are using veritas volume      manager then Vxfs. 5. Fsck Check : This filed ch...

AWK one liners [part three]

contd. sample files used for this tutorial. 1. Filteration of Row data awk   ‘$3 == $4 {print $1 “     “ $3}’ abc.txt awk -F “,” ‘$3 == $4 {print $1 “     “ $3}’ abc.csv Here before printing the required rows we can filter it out using   Some conditions. 2. Filteration of Row data with logical OR  awk -F "," '$3 == 10000 || $4 == 10000 {print $1 "     " $2}' abc2.csv 3.  Filteration of Row data with logical AND awk -F "," '$3 == 10000 && $4 == 10000 {print $1 "    " $2}' abc2.csv

AWK one liners [part two]

contd.. Here is a sample csv file 1. Print columns from a csv file  awk -F "," '{print $1}' abc.csv awk -F "," '{print $1 "    " $3}' abc.csv Where -F defines the seperator. There is an alternate method to use the field separator Here FS is used to define the filed separator which is “,” in  this case it could be a whitespace , a tab etc. 2. Display Content of the file without displaying header awk 'NR!=1 {print $1 "     " $2}' abc.txt awk 'NR>2 {print $1 "     " $2}' abc.txt Where NR indicates the row number 3. Saving AWK output to a separate file

Ubuntu upgrade from 18.04 lts to 20.04 lts

The latest version of Ubuntu is 20.04.lts and is named as “Focal Fossa”.  To start with the upgrade the first and foremost thing is to backup  the server . The rest procedure is as follows: The current os version can be recorded from /etc/os-release file. Once done with backup we need to update all packages of ubuntu 18.04  to latest by running  the command sudo apt update After successful update just upgrade all the installed packages to latest using  the command sudo apt upgrade Now remove all unused old kernels  as they wont be used any further removing them might help us clear some space on the disk. sudo apt --purge autoremove Install update-manager-core package if not already installed. Now upgrade the system to latest lts. sudo do-release-upgrade If you come across an output like this : Checking for a new Ubuntu release There is no development version of an LTS available. To upgrade to the latest non-LTS development release   set Prompt=normal...

AWK one liners [part one]

AWK was initially developed in 1977 by Alfred Aho , Peter J Wienberger  and Brian Kernighan. And hence the name(AWK) derived from  their respective initials. AWK was designed basically for text processing and used mostly for  extraction  a nd manipulation of data. For more info  :  visit here Lets start with the examples. 1. Print Specific Column from a file sample file created awk '{print $1 "   " $3}' abc.txt awk '{print $1 "   " $3}' abc.txt 2. Print all data from a table awk '{print $0}' abc.txt