This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> select TABLE_SCHEMA, table_name, round(data_length/1024/1024) as data_length_mb, round(data_free/1024/1024) as data_free_mb from information_schema.tables where round(data_free/1024/1024) > 100 order by data_free_mb; | |
+--------------+---------------+----------------+--------------+ | |
| TABLE_SCHEMA | table_name | data_length_mb | data_free_mb | | |
+--------------+---------------+----------------+--------------+ | |
| f319_xen | xf_search | 14 | 104 | | |
| f319_xen | xf_user_alert | 0 | 115 | | |
+--------------+---------------+----------------+--------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OK=0 | |
CRITICAL=2 | |
STATE=0 | |
PLUGIN_PATH="/usr/local/nagios/libexec/" | |
OID_sysDescr=SNMPv2-MIB::sysDescr.0 | |
OID_hostname=SNMPv2-MIB::sysName.0 | |
COMMUNITY=bimat | |
VERSION="1.1" | |
author="hafthanhf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
if __name__ == "__main__": | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.connect(("localhost", 9000)) | |
data = "some data" | |
sock.sendall(data) | |
result = sock.recv(1024) | |
print result | |
sock.close() |