journalctl command to see kernel messages

2017-01-30 1 min read Fedora
Sometimes, there are just too many messages in journalctl output and it becomes a mystery game to search for the messages you are looking for. But luckily you do not need to use grep to find the right message. Here is example of what I had to do when I was looking for kernel messages. journalctl _TRANSPORT=kernel # To see all the fields, you can use the verbose mode journalctl _TRANSPORT=kernel -o verbose # And the filter on priority if needed to get the messages you need journalctl _TRANSPORT=kernel PRIORITY=4 # and follow journalctl _TRANSPORT=kernel PRIORITY=4 -f -l

speed up journalctl

2016-04-25 1 min read Fedora
Sometime back I noticed that whenever I run my favourite command, viz. journalctl -xn -f -l it was taking more time than usual. So, I thought to dig more into it and finally found that the following command: sudo journalctl --disk-usage showed that journalctl was using some huge space in tune of about 4GB. So, the solution was simple, vaccum the journal entries and the command to do so is : Continue reading

better bash debugging

2011-09-16 1 min read bash Linux
I was trying to debug some bash scripts yesterday and learnt something new 😉 There are lot of things in bash that you can use to debug and to start with you can enable xtrace mode as follows: set -x With this set you will see that all the commands are printed along with all other information as they are executed. This you can do for any line or for the function or for the whole script. Continue reading

debug call function() to debug a function in vim

2011-09-04 1 min read Vim Tips
Image via Wikipedia Have you ever wished that you could either see what is going on initially at the vim startup like you could do with C program in the gdm mode, but really did not want to go through gdb. Or rather you sometime felt that some function defined by some plugin is causing some issue and you wanted to debug just that function. Well you need not wish anymore, the functionality is already there. Continue reading

/bash debugger

2011-02-27 5 min read bash Linux
9.2. A bash Debugger In this section we’ll develop a very basic debugger for bash.[10] Most debuggers have numerous sophisticated features that help a programmer in dissecting a program, but just about all of them include the ability to step through a running program, stop it at selected places, and examine the values of variables. These simple features are what we will concentrate on providing in our debugger. Specifically, we’ll provide the ability to: Continue reading