So I need to get information about a particular set of machines in the cloud (AWS). EC2_INSTANCE_ID="`wget -q -O – http://instance-data/latest/meta-data/instance-id || die \"wget instance-id has failed: $?\"`" test -n "$EC2_INSTANCE_ID" || die 'cannot obtain instance-id' EC2_AVAIL_ZONE="`wget -q -O – http://instance-data/latest/meta-data/placement/availability-zone || die \"wget availability-zone has failed: $?\"`" test -n "$EC2_AVAIL_ZONE" || die 'cannot obtain…
Category: Uncategorized
package.json sample
This is the basic structure for a node.js package file { "name": "Express-Basic", "description": "Demonstrating Express", "version": "0.0.1", "private": true, "dependencies": { "express": "3.x" } } nJoy 😉
Renaming a user on AWS
aws iam update-user –user-name suse-dev –new-user-name sqs-dev nJoy 😉
Intercept MYSQL queries with tcpdump
tcpdump -s 0 -l -w – dst port 3306 | strings nJoy 😉
Install s3cmd S3 command line tools in centos
sudo yum –enablerepo epel-testing install s3cmd njoy 😉
Kernel: e1000e 0000:02:00.0: eth0: Error reading PHY register
In recent CentOS version 6.3 is an unresolved bug, which causes the network card to freeze the server. Following message appears in /var/log/messages kernel To work around the problem you will need to turn off Active-State Power Management (ASPM) (Feature that saves power in the Peripheral Component Interconnect Express (PCI Express or PCIe) subsystem by…
Set timezone Centos
vim /etc/sysconfig/clock ZONE=”Europe/London” ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime done.. nJoy 😉
kipmi0 using 100% CPU
echo 100 > /sys/module/ipmi_si/parameters/kipmid_max_busy_us nJoy 😉
Sending Elasticsearch to a syslog server
yum install rsyslog -y Add the following to rsyslog.conf on the client system ############ $ModLoad imfile $InputFileName /var/log/elasticsearch/elasticsearch.log $InputFileTag elasticsearch $InputFileStateFile stat-elasticsearch $InputFileSeverity Info $InputFileFacility daemon $InputRunFileMonitor #local3.* hostname:<portnumber> daemon.* @192.168.1.66:514 ############ Also if you want all logs to go through to syslog server: *.* @192.168.1.66 at the end of the file….
Installing Java 7 on Ubuntu 10.04
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer nJoy 😉