tag:blogger.com,1999:blog-16261334716983499382024-02-11T13:57:26.155+05:30LazySystemAdminSharing Knowledge |
System Admin ArticlesLazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.comBlogger334125tag:blogger.com,1999:blog-1626133471698349938.post-69310330286653992092022-09-09T22:25:00.003+05:302022-09-09T22:26:12.739+05:30Quick HOWTO: Run Loop in GitHub ActionsIn GitHub Action workflows, there is no direct way to repeat the same job or step using variables. We have to use the "matrix" to achieve this.Example:my_loop_job: name: loop job runs-on: my-github-runners strategy: matrix: my_variable: [ "var1", "var2", "var3" ] steps: - name: test loop run: | &LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-79482040057477144722018-12-26T22:31:00.003+05:302019-11-05T23:09:34.487+05:30Quick HOWTO: Reset Jenkins Admin Password
To reset the jenkins admin password, You can simply disable the security in the config.xml file.
1. If your jenkins is running on the Linux OS, edit the below file.
vi /var/lib/jenkins/config.xml file.
2. Search for the word <useSecurity>true</useSecurity>
and change the word true to false.
3. Restart the Jenkins server.
service jenkins restart
4. LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com7tag:blogger.com,1999:blog-1626133471698349938.post-89553129350189054992018-05-21T16:52:00.000+05:302018-05-21T17:25:05.538+05:30Quick HOWTO: dracut fails in Linux
Issue: dracut fails when you trying to create initramfs image file.
[root@linux_server1 boot]# dracut -f /boot/initramfs-2.6.39-400.298.2.el6uek.x86_64.img 2.6.39-400.298.2
E: Failed to install /etc/system-fips
[root@linux_server1 boot]# ls -l /boot/initramfs-2.6.39-400.298.2.el6uek.x86_64.img
ls: cannot access /boot/initramfs-2.6.39-400.298.2.el6uek.x86_64.img: No such file or LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-45861304184515065252018-01-17T23:25:00.000+05:302018-01-17T23:25:54.457+05:30Quick HOWTO: Run SSH sessions in Parallel
You often used "for loop" in shell script to gather an information from large number of your Linux / Unix infrastructure servers. However if your server count is more, it may take lot of time to finish the task. Do you think it will be good if the ssh sessions to remote servers run in parallel? Since the modern day servers having multi-core CPU's we can utilize the real parallel and LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com1tag:blogger.com,1999:blog-1626133471698349938.post-40293261526494440492017-11-16T16:56:00.001+05:302017-11-16T16:58:38.900+05:30Quick HOWTO: View contents of RPM without installing it
In Linux, You may wonder what are the files inside a rpm package and you may want to check them before installing it.
You can do this with the below rpm commands:
If the rpm file available locally:
[root@linux_server1 ~]# rpm -qlp telnet-0.17-48.el6.x86_64.rpm
/usr/bin/telnet
/usr/share/man/man1/telnet.1.gz
[root@linux_server1 ~]#
[root@linux_server1 ~]# rpm -q -filesbypkg -p LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com2tag:blogger.com,1999:blog-1626133471698349938.post-52179017564467153202017-02-16T20:51:00.001+05:302017-02-16T20:51:42.894+05:30Quick HOWTO: Pacemaker Cluster on Redhat Linux - Enable Web GUI Interface
You will notice that your PCS web interface is not working after your pacemaker cluster installation. Because it is not enabled by default. Here is the steps to enable it.
cd /usr/lib/pcsd
vi pcsd.rbsearch for "DISABLE_GUI=true"
edit that line to "DISABLE_GUI=false"service pcsd restart
Now you will be able to access the pacemaker web interface as below:
https://<LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-69191273421246500482014-11-19T18:34:00.000+05:302014-11-19T18:34:07.949+05:30Quick HOWTO: Flush DNS Cache in Linux
nscd (Name Service Cache Daemon) daemon provides caching service for the name service requests in Linux.
To configure the nscd caching service, edit /etc/nscd.conf
To Flush the DNS Cache in Linux server:
# /etc/init.d/nscd restart
OR
# service nscd restart
Hope this helps..
LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com1tag:blogger.com,1999:blog-1626133471698349938.post-82863058817797849462014-02-17T16:56:00.000+05:302014-11-05T22:14:03.879+05:30Quick HOWTO: Change I/O Scheduler in Linux
I/O schedulers in Linux
noop - It can be helpful for devices that do I/O scheduling themselves, as intelligent storage, or devices that do not depend on mechanical movement
cfq - A fairness-oriented scheduler. It tries to maintain system-wide fairness of I/O bandwidth
deadline - A latency-oriented I/O scheduler. Each I/O request has got a deadline assigned.
LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com2tag:blogger.com,1999:blog-1626133471698349938.post-1055785770676039312013-08-17T09:02:00.001+05:302013-08-26T12:40:55.794+05:30Quick HOWTO: Reduce SWAP Partition Online without reboot in Linux
Recently I had a request to reduce the swap space and allocate that space to some other LV in one of our server. Below is what I followed and it perfectly worked for me. :)
Make sure you have enough physical memory to hold the swap contents.
Now, turn the swap off:
# sync
# swapoff <YOUR_SWAP_PARTITION>
Now check the status
# swapon -s
Then, Use fdisk LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-52877727575847616542013-01-05T18:25:00.001+05:302013-01-05T18:25:24.006+05:30Create RAID Disk using hpacucli in Linux
1. CHECK UNASSIGNED DRIVES THAT CAN BE USED
server1:~ # hpacucliHP Array Configuration Utility CLI 8.70-8.0Detecting Controllers...Done.Type "help" for a list of supported commands.Type "exit" to close the console.
=> hpacucli ctrl all show config
Smart Array P400 in Slot 9 (sn: P61XXXXXXXXXN) array A (SAS, Unused Space: 0 MB) logicaldrive 1 (68.3 LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-89367181727262774062013-01-05T17:46:00.000+05:302013-01-05T17:53:59.943+05:30Solution for UNIX Error: Terminal too wide
When you are working in an UNIX shell using Putty tool, you may get this error.
Problem:
When you are trying to open vi editor, you may get error message "Terminal too wide"
How to Fix this??
Enter the below command in the shell and try to open vi editor again. It will work.
stty columns 120
Hope this will help on someone.
LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com2tag:blogger.com,1999:blog-1626133471698349938.post-4011015555846888032012-09-09T18:26:00.001+05:302012-09-10T11:56:00.508+05:30File System Extension on Live Linux VMware Guest using vmdisk size extended
Many thanks to RAM for this Article.
---
This article explains, Filesystem extension on live Linux VMware Linux Guest where vmdisk size is extended and by not new disk added.
We had a scenario as follows:
1. File system extension requirement on a live mounted file system without reboot.
2. It’s aLazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com1tag:blogger.com,1999:blog-1626133471698349938.post-9654526771303908822012-08-14T19:57:00.000+05:302012-08-14T19:57:21.029+05:30Allow SSH and Web Connections in IP Tables in Linux
To Allow web and ssh connections in IP Tables
SSH and web both require out going messages on established tcp connections.
iptables -A OUTPUT -o eth0 -m state –state ESTABLISHED,RELATED -j ACCEPT
Then you need to allow incomming connections on port 80 and 22 and possibly 443
iptables -A INPUT -p tcp -i eth0 –dport 22 –sport 1024:65535 -m state –state NEW -j ACCEPTiptables -A INPUT -p tcp -iLazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-14783687321710107232012-08-14T18:20:00.001+05:302014-11-05T22:39:09.371+05:30migratepv VS replacepv
what is the difference between migratepv and replacepv?
replacepv command simply moves all the logical partitions on one physical volume to another physical volume. The command is designed to make it easy to replace a disk in a mirrored configuration.
migratepv command also very similar.
The biggest difference is that migratepv allows you to copy the LPs on a logical volume basis, not LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-28420033247357215082012-08-14T17:40:00.000+05:302012-08-14T17:40:08.944+05:30What is umask?
umask will be used for setting the default file creation permissions.When a file is created, its permissions are set by default, depending on the umask setting configured.
This value is usually set for all users in /etc/profile and can be obtained by typing command umask:
testuser$ umask0022
The default umask value is usually 022. It is an octal number which indicates what rights will LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com1tag:blogger.com,1999:blog-1626133471698349938.post-61855979055409347002012-08-14T17:21:00.000+05:302012-08-14T17:21:22.344+05:30Changing default gateway in SuSE Linux
Adding default Gateway in Linux SUSE
To change the default route permanently in SuSe Linux, make an entry in /etc/sysconfig/network/routes file.
For example, to make 192.168.10.1 as default route, add the following line into /etc/sysconfig/network/routes file.
default 192.168.2.1 - -
Using route command:
To route all the traffic via 192.168.1.1 gateway connected via eth1 network LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com1tag:blogger.com,1999:blog-1626133471698349938.post-17692978615078895972012-08-14T17:09:00.000+05:302012-08-14T17:09:03.895+05:30Setting Limits for Users in Linux
We can set useful limits for users which is useful to
control the resource utilization in Linux. This can be configured in
/etc/security/limits.conf. To activate these limits you need to add the
following line to the bottom of /etc/pam.d/login file in your Linux server.
session required /lib/security/pam_limits.so.
Entries in limits.conf file have the following
structure:
[LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com4tag:blogger.com,1999:blog-1626133471698349938.post-82686443881800516792012-08-14T16:20:00.000+05:302012-08-14T16:21:06.605+05:30Special Shell Variables - Useful for Scripting
Below are the special shell variables. These are important
to know for everyone, especially who is willing to learn shell scripting. Hope the list helps.
Name
Description
$1
- $9
These
variables are referring the parameters passed to command or script. $1 refers
to the first argument and $2 refers second and so on.
$0
The
name of the LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-52011875645042705712012-06-03T15:51:00.001+05:302012-07-02T10:09:37.400+05:30Network cards changed to '__tmpXXXX' instead of ethX after reboot in Linux
We have faced a strange issue recently and would like to share that to LazySystemAdmin readers.
Problem / Issue:
After upgrading the kernel, we rebooted the server. After reboot, some of the Ethernet network cards (NIC) are renamed to '__tmpxxxx' instead of ethX. Ethernet interface keeps changing into '__tmpxxxx' even after two more reboot of the server.
"ifconfig -a" outputLazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com3tag:blogger.com,1999:blog-1626133471698349938.post-69994211262611730292012-05-10T20:34:00.001+05:302012-05-10T20:34:48.000+05:30Interview Questions and Answers - Linux Administrator - 3
What is the major difference between ext2 and ext3 file systems?
The main difference between ext2 and ext3 is, ext3 allows journaling. (Journaling is a type of log file, which tracks all the file system changes. so that you can recover in case of filesystem crash)
Explain Linux Booting Process?
When the computer is switched on, it automatically invokes BIOS [a ROM chip embedded in the LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com4tag:blogger.com,1999:blog-1626133471698349938.post-62357037354800559002012-04-02T20:20:00.000+05:302012-04-02T21:13:58.838+05:30kblockd Process - High Utilization in Linux - Quick View
I have came across the situation where multiple kblockd process are utilizing the CPU heavily and causing server load high in Linux servers. I was wondered what is kblockd and why it is taking high CPU utilization. But there is not much information available in internet about kblockd. After lot of research, the below is what I learned.
What is kblockd?
In a general, the LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com4tag:blogger.com,1999:blog-1626133471698349938.post-87262351122333175312012-02-28T23:53:00.001+05:302012-02-29T00:14:35.012+05:30Disable Ping on Linux Server - Quick HOWTO
How do you disable ping to Linux server? Here is the quick steps:
To disable ping:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
To enable ping:
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all
That's all..!
LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-46280281802753892932012-02-28T23:49:00.000+05:302012-02-28T23:49:17.876+05:30Change Username Max Length in AIX - Quick HOWTO
In AIX 5.3,
To change the default length of username:
# chdev -l sys0 -a max_logname=9sys0 changed
To check the current length of username:
# lsattr -El sys0 -a max_lognamemax_logname 9 Maximum login name length at boot time True# getconf LOGIN_NAME_MAX 21
Hope this quick tip helps someone..!
LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com0tag:blogger.com,1999:blog-1626133471698349938.post-55832828971600147762012-01-10T09:13:00.001+05:302012-01-10T09:13:49.245+05:30Find WWN and WWPN in Solaris
How do you find out WWN and WWPN of HBA in Solaris server? Here is the quick way to get wwnn and wwpn in Solaris:
testuser@testsunsrv # /usr/sbin/prtconf -vp | grep -i wwn port-wwn: 210000e0.4m1e143f node-wwn: 200000e0.4m1e143f &LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com3tag:blogger.com,1999:blog-1626133471698349938.post-27207645647220624152012-01-09T19:46:00.000+05:302012-01-09T19:48:56.773+05:30hpacucli - Check RAID Information from Linux Shell
Have you ever tried to check how the hardware RAID Array configured on server from your Linux Shell? Have you ever wanted to change or modify your Hardware RAID configurations without rebooting the server and without leaving your Linux shell?
hpacucli utility is there to help you, If your server is HP Hardware. hpacucli (HP Array Configuration Utility CLI) is a command line based disk
LazySystemAdminhttp://www.blogger.com/profile/01907118252758913311noreply@blogger.com2