Ένας συνδιασμός των προσπαθειών των vrypan και javapapo για καταγραφή δωρεάν WiFi σημείων ανά την Ελλάδα. ο χάρτης είναι ανοιχτός οπότε όποιος έχει όρεξη μπορεί να προσθέσει σημεία που δεν έχουν καταγραφεί.
Month: May 2009
Report disk space usage
A quick shell script that reports which disks use more than a specified percentage of disk space. Can be used as a cronjob to mail the results.
############################################################################ # Copyright (C) 2009 Panagiotis Kritikakos <panoskrt@gmail.com> # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################ #!/bin/bash if [ $# -lt 1 ] || [ $# -gt 2 ]; then echo "Usage ./disk_usage <percentage>"; echo " Example: ./disk_usage 50"; exit; fi space=(`df -h | awk '{sub(/%/,"");print $5}' | grep -v / | grep -v Use | grep -v ^$`) spaceLen=${#space[*]} i=0 echo "The disks bellow use more than ${1}% of their space" > /tmp/diskSpace echo "-----------------------------------------------------" >> /tmp/diskSpace while [ $i -lt $spaceLen ]; do checkval=${space[$i]} if [ $checkval -gt $1 ] || [ $checkval -eq $1 ]; then df -h | grep $checkval | awk '{print $1 "\t" $5 "\t" $6}' >> /tmp/diskSpace fi let i++ done /usr/bin/Mail -s "Disk space usage" foo@bar.com < /tmp/diskSpace rm -f /tmp/diskSpace
Bridging a network interface
I’ve been trying out recently KVM. It supports NAT by default but you need to manually configure one of the physical interfaces of the system as bridge in order to enable you to bridge a virtual machine’s network.
At fist place I had to create a new interface configuration file for the bridge in /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0 TYPE=Bridge BOOTPROTO=dhcp ONBOOT=yes
Once having the bridge file configured, I had to adjust the eth0 configuration:
DEVICE=eth0 HWADDR=00:22:29:18:A8:73 ONBOOT=yes BRIDGE=br0
If instead of DHCP you’re using a static IP, then copy and paste the network information of ifcfg-eth0 to ifcfg-br
Checking after a reboot:
$ /sbin/ifconfig br0; /sbin/ifconfig eth0 br0 Link encap:Ethernet HWaddr 00:22:29:18:A8:73 inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::222:12ff:fe08:d113/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:449219 errors:0 dropped:0 overruns:0 frame:0 TX packets:253636 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:593165878 (565.6 MiB) TX bytes:133241643 (127.0 MiB) eth0 Link encap:Ethernet HWaddr 00:22:29:18:A8:73 inet6 addr: fe80::222:12ff:fe08:d113/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:448789 errors:0 dropped:0 overruns:0 frame:0 TX packets:313443 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:600638671 (572.8 MiB) TX bytes:138369880 (131.9 MiB) Interrupt:177
In some cases I faced routing issues, the following solved them:
route add -net 192.168.1.0 gw 192.168.1.254 netmask 255.255.255.0 dev br0
Timestamp issue with Amazon EC2
I was playing yesterday with Eucalyptus Public Cloud, which is an Open Source project, that gives free access to some of the resources of their cloud where you can get a taste of Amazon’s EC2 tools. Having configured the environment of my system, I tried to retrieve the list of the available zones on which I could deploy some of Eucalyptus’ virtual machines. However, the first few tries returned a timestamp problem:
$ ec2-describe-availability-zones Server: An error was discovered processing the header. (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)
So it looked like there was an issue between the timing of my system against that of the server. I decided to synchronise my system with an NTP server. There was indeed something more than five minutes difference between my system’s manual time and that of the NTP sever:
Manual time:
$ date Tue 12 May 2009 18:52:22 BST
NTP sync:
$ date Tue 12 May 2009 18:57:37 BST
One more try to fetch the list:
$ ec2-describe-availability-zones AVAILABILITYZONE epc mayhem9.cs.ucsb.edu
It worked this time. As mentioned here “each message sent by the client contains a time-stamp. The server refuses messages sent more than five minutes ago. This is to prevent replay attacks (where an attacker gets hold of a valid message and then sends it again later)“.
Wikiloc
I just came across Wikiloc, which “is a free web app that lets you discover and share outdoor trails on the web in an easy way”. Really interesting project with thousands of trails around the globe. Available through the browser with Google Maps and exists as a layer within Google Earth as well. Really important that users can contribute with their own routes.
Globus Toolkit post-installation notes
A few problems encountered after Globus Toolkit 4.2.1 installation and configuration:
While submitting a job:
globusrun-ws: Job failed: Error code: 201Script stderr: sudo: sorry, you must have a tty to run sudo
The “requiretty” option must be removed from sudoers file.
globusrun-ws: Job failed: Error code: 200Sudo is misconfigured to run the globus-job-manager-script.pl script for user $USER.
User “globus” needs to be in sudoers file.
While transferring data with GridFTP:
error: globus_ftp_client: the server responded with an error 530 530-Login incorrect. : globus_gss_assist: Gridmap lookup failure: Could not map /DN ENTRY/ 530- 530 End.
GridFTP server needs to run as ‘root’: http://www.globus.org/mail_archive/discuss/2002/05/msg00337.html
The Hunt For Gollum
Το “The Hunt For Gollum” είναι μια ταινία μικρού μίκους εμπνευσμένη από τον Άρχοντα των Δαχτυλιδιών. Πρώτη προβολή σήμερα, και δωρεάν σε HQ video online: http://www.thehuntforgollum.com/