This file contains hidden or 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
| -- Temporary file usage by database | |
| SELECT datname AS "database", temp_files AS "Temporary files", temp_bytes | |
| AS "Size of temporary files" | |
| FROM pg_stat_database; | |
| -- Cache Hit Ratio. Anything greater than 90% is always good | |
| SELECT sum(blks_hit)*100/sum(blks_hit+blks_read) AS hit_ratio FROM pg_stat_database; | |
| -- Top Queries | |
| SELECT substr(query, 0, 250), calls, |
This file contains hidden or 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
| ssh admin@nas | |
| /etc/init.d/services.sh stop | |
| /etc/init.d/xdove.sh stop | |
| # See if there are still files open on the disk: | |
| lsof |grep /share/MD0_DATA | |
| # Kill the open processes if any. |
This file contains hidden or 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/sh | |
| # | |
| # Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN | |
| # on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise). | |
| # | |
| # DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN | |
| # YOUR AMAZON EC2 INSTANCE STARTS! | |
| # | |
| # Copyright (C) 2014 Lin Song | |
| # Based on the work of Thomas Sarlandie (Copyright 2012) |
This file contains hidden or 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 -x | |
| # Description:L2TP/IPsec for CentOS 6.5 64bit | |
| # 2014/01/06 @ysaotome | |
| ( | |
| ### setting | |
| /bin/cat << _SECRETS_ > /tmp/SECRETS_TMP.txt | |
| #============================================== | |
| # username auth_server password auth_ipaddress | |
| "hoge001" "xl2tpd" "hoge##123" * |