Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Tuesday, December 22, 2020

How to check kernel version in linux

How to check kernel version in linux

There are various commands by which we can check current kernel version in linux:

1. #uname -r 

2. #cat /proc/version 

3. #dmesg |grep -i linux

4. #hostnamectl

by above commands we can get current kernel version installed on the system. 

If we want more information like installed date, release date etc.. of that kernel rpm then use below commands:

1. #rpm -qa --last |grep -i kernel  --> to get the date of kernel update

2. #cat /var/log/yum.log |grep -i kernel  ---> If the kernel update is done via yum repository then in the yum.log files will get information of when the kernel installed or kernel related packages updated.

3. #rpm -qi <kernel version name>  ---> We can get the complete kernel version name using above 1-4 commands.


Regards,

Kiraan B Jadhav

Wednesday, December 16, 2020

Can I delete files in /var/log/journal ?

Can I delete files in /var/log/journal ?


/var/log/journal/ are kept the log files created by the journal service (systemd). Yes, the files from /var/log/journal directory can be removed.


1. If /var/log/journal log file using more space like 3.5G etc.. 

We can verify it by running below command:

# journalctl --disk-usage


2. Note down the SystemMaxUse value, it could be hashed or having value like 3.5G

#cat /etc/systemd/journald.conf |grep -i SystemMaxUse


3. Before editing journald.conf file; take copy of it

#cp -rp /etc/systemd/journald.conf /etc/systemd/journald.conf_backup


4. Edit the file journald.conf using vi editor and change the value SystemMaxUse to 200 or 300MB

#cat /etc/systemd/journald.conf |grep -i SystemMaxUse

SystemMaxUse=300M


5. Restart the systemd-journald service to make the changes effective done in /etc/systemd/journald.conf

#systemctl restart systemd-journald


Or


If you do not want to restart the systemd-journald service then use below command :

#journalctl –vacuum-size=300M 



Thanks,

Kiraan B Jadhav

Monday, December 14, 2020

Zoneadm commands list in solaris 11

Zoneadm commands list in solaris 11:


The zoneadm utility is used to administer system zones. 

Run below commands from Global zone:

#zoneadm list -civ  --> to list the zones and their status like running , uninstall etc..

#zoneadm -z (zone_name) halt  --> To halt the zone

#zoneadm -z  (zone_name) boot --> to boot the halted zone

#zoneadm -z (zone_name) reboot --> to reboot the zone


To login zones:

#zlogin (zone_name) -- To login particular zone



Regards,

Kirraan Jadhav

Tuesday, October 27, 2020

How to run explorer on Solaris 11

How to run explorer on Solaris 11 : 


Why we run explorer: To collect the hardware issues and OS related issues. It contains output of files like dmesg, system files, hardware errors etc...

How to run:  Just run explorer command, the command will run from /usr/sbin/explorer

# explorer

If you are running it for the first time:

# explorer -g

The output will get stored at /var/explorer/output

To check the explorer version:

# explorer -v

 

Regards,

Kirraan Jadhav

Monday, October 26, 2020

/boot housekeeping + linux

/boot is almost full + linux


It is recommended to have at least 1GB of space for /boot.  


The safest way of cleaning up /boot is :


Do the following to keep just the last 2 kernels on your system, to keep /boot clean.

1 - Edit /etc/yum.conf and set the following parameter

# vi /etc/yum.conf

installonly_limit=2

This will make your package manager keep just the 2 last kernels on your system(including the one that is running)

 

2 - Install yum-utils utility so the package-cleanup command will work:

# yum install yum-utils

 

3 - Make an oldkernel cleanup:

# package-cleanup --oldkernels --count=2

4. This will clear lots of space. If not, then we can note down the current kernel version and can move the other kernels files to another directory.

To know current version of kernel:

# uname -r

Or

# rpm -qa kernel

Move other kernel files to another directory

# mv /boot/<file name> /root/oldkernels

 

Regards,

Kirraan Jadhav


Tuesday, August 18, 2020

scriptlet failed, exit status 127 + RPM error

RPM error "scriptlet failed, exit status 127"


Sometime while patching the server, we may get message to delete some patches which create conflict.

And while deleting those conflicting rpms we get error something like this:

E
[root@cloud home]# rpm -e --nodeps ILMT-TAD4D-agent.i386-cs-cam.noarch

/var/tmp/rpm-tmp.XIuSM4[137]: /var/itlm/utilities/cit/wcitinst: not found [No such file or directory]

error: %preun(ILMT-TAD4D-agent-7.5-1.i386) scriptlet failed, exit status 127


We are erasing the rpms using -e option and not removing the rpm dependency   (Reason : The dependencies could be part of other rpms and by removing it we may encounter problem for other rpms). 
--nodeps Do not verify dependencies
  

 Solution:

 Delete the rpm using --noscripts option. The --noscripts option tells the rpm command not to run any uninstallation scripts

--noscripts  = Do not execute verification script

[root@cloud home]# rpm -e --nodeps  --noscripts ILMT-TAD4D-agent.i386

Regards,
Kalyanjit

Tuesday, August 11, 2020

How To get ZFS storage serial number + ZFS

How To get ZFS storage serial number, model number and OS details: 

Login to ZFS

zfsc1:> configuration version show

or 

zfsc1:> maintenance hardware show


Regards,

Kiran Jaddhav


How to generate (ak) Support bundles on ZFS

How to generate (ak) Support bundles on ZFS storage:

Step 1 : Login to ZFS

 zfsc1:> maintenance system bundle

bundle   bundles

zfsc1:> maintenance system bundle    ---> Main command

The support data you requested is being built in 3 files. Use 'send <srn>' with each bundle to associate the bundle with a Service Request Number and send it to

Oracle Support. Alternatively, you may download the bundles via the appliance BUI.

    ak.938k008c-9e13-4593-9305-b54d87659710.tar.gz

    ak.3b22kdbf-c95i-4b6a-be85-d89f58b18b97.tar.gz

    ak.eee2580k-bfi8-6442-defe-e9faccd32fb7.tar.gz


then 

zfsc1:> confirm shell              ----- We will get shell prompt

step 2 : Go to location where bundles get stored

# cd /var/ak/bundles           -- bundles will be stored here with the current date

step 3: We can check the same in ps command as well.

#ps -ef |grep -i bund = to check support bundle process are running or not


Example:

zfsc1# ps -ef |grep -i bund

    root 16467   389   0 13:03:19 ?           0:10 /usr/bin/bash -p /usr/bin/akbundle -b 938k008c-9e13-4593-9305-b54d87659710 -c C

    root  2251 16467   0 13:13:19 ?           0:05 /usr/bin/bash -p /usr/bin/akbundle -b 938k008c-9e13-4593-9305-b54d87659710 -c C


Regards,

Kalyanjit