martes, 24 de diciembre de 2019

[EN] How IT people see each other

Have you ever thought about it? Like SysAdmin or DevOps, how do you see the other colleagues in the IT department? And best of all, how do you see them?


I have to confess that as SysAdmin, sometimes I find myself thinking the same thing ... doesn't it happen to you?

Anyway, just wanted to wish you have a Merry Christmas and a really Happy 2020!

viernes, 29 de noviembre de 2019

[EN] Cleaning old systemd journal logs

Have you found that your folder is too big?

esther@Raton:~# du -hs /var/log/journal/
6,5G    /var/log/journal/

or

esther@Raton:~# du -hs /run/log/journal/
2,5G    /run/log/journal/


And have you found that once there you can't read any log messages?

esther@Raton:/var/log/journal/xxxxxxxxxxxxxxxxxxxxxxx# tail system.journal
L�8M�ތp�+2uW����.��+0OÈ�
                         �+B�ةO\@H�+ւ���|�X��+.�{EPр�+��)���ב�+o�
                                                                 �PX���+q���r�� �+"��)F���+�N��6���h�+l@����+n��Bm�B���+�{۳O�z�h�+�Z-9a���+"_�����+*(W4W8,FP�2���*�땠�OT� %$�����.fV�9P�| �J�8��8������3.��p�MESSAGE=XXXX [...]


Don't worry, that's pretty normal.

First of all, you can read your systemd journal log files just using

>  journalctl

and explore its options; some pretty useful may be
     --system                Show the system journal
     --user                  Show the user journal for the current user
  -r --reverse               Show the newest entries first
  -o --output=STRING         Change journal output mode (short, short-precise,
  -a --all                   Show all fields, including long and unprintable
     --vacuum-size=BYTES     Reduce disk usage below specified size
     --vacuum-files=INT      Leave only the specified number of journal files
     --vacuum-time=TIME      Remove journal files older than specified time


For example, for cleaning old files we have different ways using the last three options

> journalctl --vacuum-time=15d
> journalctl --vacuum-size=1G

Or you can check the live logs from a systemctl service using

> journalctl -xef -u systemctl.service

domingo, 13 de octubre de 2019

[EN] How to enable telnet feature on Windows 10 system (it works with HOME edition)

Hi all!
 



Just wanted to leave a tiny little recipe to enable TELNET on Windows 10 from the command line; as a good Linux user I LOVE the command line... so... here we go!

Just need to run this command

dism /online /Enable-Feature /FeatureName: TelnetClient


from the Symbol System window and your system will do the rest



Hope that helps!

sábado, 21 de septiembre de 2019

[EN] Hacking Tools cheat sheet

Hello!!!

Today I wanted to share that Hacking Tools Cheat Sheet where you can find very interesting commands and tools.

Use them wisely; you know, a great power entails a great responsibility



domingo, 25 de agosto de 2019

[EN] MySQL/MariaDB: filtering processlist query

Haven't seen you in a while... but today I bring you something really interesting I just found out


I'm pretty sure you already know about

mysql> show processlist;


that shows you all the threads that MySQL is running for your user (or all the users if you are root) in that very moment; the problem of that query is that you can't limit or filter it at all and sometimes you need to. 

The cool part is that you can run the same query using

mysql> SELECT * FROM information_schema.processlist;

and filter it as you need!!!!

mysql> SELECT * FROM information_schema.processlist where Host='remote_host';
mysql> SELECT * FROM information_schema.processlist where User='remote_user';

That really made my day! 
And yours?