Skip to main content

Command Palette

Search for a command to run...

Day 29-31 #90DaysOfDevops

Published
2 min readView as Markdown
O

Aspiring Devops engineer eager to make an impact.

For days 29-31, i learnt how to manage Linux kernels and loadable kernel modules and also how to automate tasks with Job Scheduling.

Basically the kernel is the central nervous system of the operating system,it controls everything it does, including managing interactions between hardware components and starting the necessary services.

To check all the installed modules in the kernel, the lsmod command is used. it lists all the kernel modules as well as information on hteir size and what other modules may use them. To get more information on a particular module, the modinfo command is used. it reveals significant information about the module.

To add a module, modprobe -a <module name>, to remove a module, modprobe -r <module to be removed>.

Now unto automating tasks, the cron daemon and the crontab are the most useful tools for scheduling regular tasks. To specify the moment or period of time you want an automated schedule to run they are time representations that are used. Minute is represented by 0-59, hour by 0-23, day of the month by (1-31), month by 1-12, day of the week by 0-7.

So to automate a script named myscript every night at 3:30 am, monday - friday, the command will be 30 3 # # 1-5 root /root/myscript. ‘30’ represents the minute, 3 represents the hour, # represents anytime becuase we wants the script to run always regardless of the day or the month.

there are also shortcuts that can be used e.g @yearly, @noon, @midnight.

This was quite fun to learn as it’s something i have thought before and wanted to learn. From experiences of other linux users, scheduling scripts is an almost everyday task so it’s a great knowledge to have.

Chhers to many more days.

More from this blog

#90DaysOfDevops

35 posts

It's a daily blog of my Daily learning plan for the next 90 days. At the end of the day, i summarised what i have learnt and difficulties faced while learning.