Thứ Năm, 27 tháng 7, 2017

Linux: Find Out What Process Are Using Swap Space

The top and free command display the total amount of free and used physical and swap memory in the server. How do I determine which process is using swap space under Linux operating systems? How do I find out swap space usage of particular process such as memcached?You can use the any one of the following techniques but keep in mind that because of shared pages, there is no reliable way to get this information[1] [a] /proc/meminfo...
Read More

Thứ Tư, 26 tháng 7, 2017

Monitor ping other host using zabbix agent

We needed to monitor ping times from one server to another, neither being the Zabbix server.  Zabbix doesn’t have a way to do this; the only pings that Zabbix can do are from the Zabbix server to another server. I wrote the attached script to solve this problem.  Install the script onto each client that you need to do this sort of monitoring, in the /etc/zabbix/externalscripts directory (or wherever you have configured...
Read More

Thứ Ba, 25 tháng 7, 2017

Cannot start the snmpd service Esxi

Cannot start the snmpd service Esxi Call "HostServiceSystem.Start" for object "serviceSystem" on ESXi \ failed. Cannot start the snmpd service Esxi 5.5 Symptoms The snmpd service fails to start from vCenter Server with the error: Call "HostServiceSystem.Start" for object "serviceSystem" on "some_IP" ESXi \ failed. Resolution To copy the contents of the file to the problem host:  Log in to a console...
Read More

Thứ Sáu, 21 tháng 7, 2017

{Rảnh Story} wtf rm -rf /* is removed ?

Download Full Log here: https://www.fshare.vn/file/2UVL3EDGTHOO =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.07.22 08:12:30 =~=~=~=~=~=~=~=~=~=~=~=Using username "hungnv".Authenticating with public key "rsa-key-20170627" [root@localhost /]# rm -rf /* removed ‘/bin’removed ‘/boot/'removed ‘/dev/'removed ‘/etc/'removed ‘/home'removed ‘/lib’removed ‘/lib64’removed directory: ‘/lost+found’removed directory: ‘/media’removed directory:...
Read More

mysql innodb crash recovery như thế nào

Mysql innodb internal là một chủ đề khá sâu. Bản thân tôi cũng chưa bao quát hết. Bài viết này chỉ cung cấp một cái nhìn sơ lược. Để các bạn không cảm thấy bài viết quá dài dòng, tôi sẽ tóm tắt qua những gì sẽ viết. Từ một hình vẽ về kiến trúc hoạt động của mysql innodb tôi sẽ đi vào phân tích nhiệm vụ chức năng của những khối chính trong...
Read More

Thứ Tư, 19 tháng 7, 2017

Encode Bash Script

1. Demo Nội dung file cần encode: [root@localhost Desktop]# cat script.sh #!/usr/bin/env bash echo "Day la noi dung test" 2. Tạo file encode base64 [root@localhost Desktop]# echo '#!/usr/bin/env bash' > other.sh [root@localhost Desktop]# echo "echo '$(base64 script.sh)' | base64 -d | sh" >> other.sh [root@localhost Desktop]# cat other.sh #!/usr/bin/env bash echo 'IyEvdXNyL2Jpbi9lbnYgYmFzaAplY2hvICJEYXkgbGEgbm9pIGR1bmcgdGVzdCIK'...
Read More

Zombie Process

Zombie thực chất là một phần còn sót lại của một tiến trình đã ngừng hoạt động nhưng chưa được xử lý sạch. Những chương trình sau khi thoát để lại tiến trình Zombie thì điều đó đồng nghĩa với việc chương trình đó được lập trình không tốt.Vậy chính xác “zombie process” được tạo ra như thế nào?Muốn hiểu chính xác quá trình này, bạn cần có một chút hiểu biết về cách hoạt động của các tiến trình trong HĐH Linux. Một khái niệm bạn...
Read More

Thứ Ba, 18 tháng 7, 2017

Understanding the Load Average on Linux

Load và Load Average Với hệ thống Unix(bao gồm cả Linux), system load đo lường công việc tính toán mà hệ thống đang thực hiện. Đo lường này được thể hiện dưới dạng số. Máy tính hoàn toàn không hoạt động thì có load average là 0. Mỗi process sử dụng hoặc đợi tài nguyên CPU load sẽ được cộng thêm 1. Nếu hệ thống có load là 5 nghĩa là có 5...
Read More