TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
Set db path for pg_upgradecluster:
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
Set db path for pg_upgradecluster:
#!/bin/bash | |
while : | |
do | |
echo "$(date) @ $(hostname)" | |
echo "Performing new stress testing cycle..." | |
stress --cpu 20 --io 20 --vm 6 --vm-bytes 25M --timeout 120s | |
cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
echo "-------------------------------------------" | |
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)" |
#!/bin/bash | |
# cpustatus | |
# | |
# Prints the current state of the CPU like temperature, voltage and speed. | |
# The temperature is reported in degrees Celsius (C) while | |
# the CPU speed is calculated in megahertz (MHz). | |
function convert_to_MHz { | |
let value=$1/1000 | |
echo "$value" |
Timers provided by systemd can be used as cronjob replacements. More at man systemd.timer
.
Suppose we want to periodically trigger cleanup tasks for a baz
utility. We 'll create a baz-cleanup.service
which will
be triggered by a baz-cleanup.timer
.
Create a minimal service at /lib/systemd/system/baz-cleanup.service
:
#!/usr/bin/env python | |
""" | |
rdns.py | |
This is a Python script that helps you create | |
reverse DNS zone files for the Bind Name Server. | |
I published it together with this blog post: http://goo.gl/CJwly . | |
""" |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
Action | tmux | screen |
---|---|---|
start a new session | tmux tmux new tmux new-session |
screen |
start a new session with a name | tmux new -s name | screen -S name |
re-attach a detached session | tmux attach tmux attach-session |
screen -r |
re-attach a detached session with a name | tmux attach -t name tmux a -t name |
screen -r name |
re-attach an attached session (detaching it from elsewhere) | tmux attach -dtmux attach-session -d | screen -dr |
000000 Officially Xerox | |
000001 SuperLAN-2U | |
000002 BBN (was internal usage only, no longer used) | |
000003 XEROX CORPORATION | |
000004 XEROX CORPORATION | |
000005 XEROX CORPORATION | |
000006 XEROX CORPORATION | |
000007 XEROX CORPORATION | |
000008 XEROX CORPORATION | |
000009 powerpipes? |
# Monitoring on interface eth0 | |
tcpdump -i eth0 -n port 67 and port 68 |