Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) 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