wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
unzip 8-07-14_MegaCLI.zip
<div id="header-plugin"></div> | |
<div class="bg_heart"></div> |
# | |
# Proof of concept for a HAProxy maintenance mode | |
# | |
# | |
# Control the maintenance page during runtime using the stats socket: | |
# | |
# To put the whole site in maintenance mode (for all IPs): | |
# > add acl #0 0.0.0.0/0 | |
# | |
# To exclude your own ip, so you are able to test things out: |
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <[email protected]> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
#!/bin/bash | |
# | |
# ************************************************* | |
# chkconfig: 2345 99 99 | |
# description: notify email address on system boot. | |
# ************************************************* | |
# Installing: | |
# 1) save as /etc/rc.d/init.d/notify | |
# 2) set the desired email address in "MAILADD" variable | |
# 3) chmod a+w /etc/rc.d/init.d/notify |
#!/bin/bash | |
# Show the rate of swapping (in number of pages) between executions | |
OK=0 | |
WARNING=1 | |
CRITICAL=2 | |
UNKNOWN=-1 | |
EXITFLAG=$OK | |
WARN_THRESHOLD=1 |
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
CREATE USER username WITH PASSWORD 'the_password'; | |
GRANT CONNECT ON DATABASE the_database TO username; | |
GRANT USAGE ON SCHEMA public TO username; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO username; | |
-- has to be executed while connected to the actual database | |
\c the_database | |
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO the_database; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public to the_database; |