Bài đăng

Đang hiển thị bài đăng từ Tháng 11, 2013

Get your Dell Service Tag number via the Linux command-line

When your server is located in a data center far away, it makes it difficult to walk over to the box and read the service tag off of it. Fortunately, the Service Tag is stored somewhere in the system BIOS, and is accessible with the ‘dmidecode’ utility. [root@host ~]# dmidecode|grep "Serial Number" Serial Number: 80NZV71   You’ll probably see several other serial numbers in there as well for things like your hard drives or other devices. The Dell shouldn’t be too difficult to pick out. I think they are always 7 digits and have letters in middle. There is lots of other interesting things in the ‘dmidecode’ output too, like the speed and type of each RAM module installed, and a description of all of the onboard devices (ie: video and network cards) With Windows Thanks to @kleinbaas who commented below how to do the same thing on a Windows machine: C:\Documents and Settings\brandon>wmic bios get serialnumber SerialNumber GX245D1

How To find server serial number remotely ( Windows)

How many times have you been into a situation where you needed the serial number of a remote server and there is nobody on the remote location to be able to give you that? Windows have a built in function to let you retrieve the serial number of a PC or server via WMIC (Windows Management Instrumentation Command-line, which uses the power of Windows Management Instrumentation (WMI) to enable systems management and info retrieval from the command line. Here are some examples of the command use: To get a list of all the physic al drives of a server including sizes and model numbers run the following command: wmic diskdrive get model,name,size Result looks like this: Model Name Size ADAPTEC RAID 1 SCSI Disk Device \\.\PHYSICALDRIVE1 799957831680 GB0250C8 045 SCSI Disk Device \\.\PHYSICALDRIVE0 250056737280 To retrieve the serial number of the computer run the following command: wmic bios get serialnumber   Result looks like this: SerialNumber CZ10101010 To retri

MySQL Backup Script

Backup is one of the most important, part of the database administration. There are several ways to backup MySQL data. I'm discussing a very simple script, easy script  to take backup of multiple databases. This script can be customized as, per the requirement. Script #!/bin/bash MyUSER="backup" # USERNAME MyPASS="backup_pass" # PASSWORD MyHOST="localhost" # Hostname # Linux bin paths, change this if it can not be autodetected via which command MYSQL="$(which mysql)" MYSQLDUMP="$(which mysqldump)" CHOWN="$(which chown)" CHMOD="$(which chmod)" GZIP="$(which gzip)" # Backup Dest directory, change this if you have someother location DEST="/backup" Month="$(date +"%b")" Day="$(date +"%a")" # Main directory where backup will be stored MBD="$DEST/data/$Month/$Day

Kitty: ssh/telnet client for window

Hình ảnh
Kitty is a fork of putty (0.62 version), with all old features along with an extended features. It is one of the best (my view), open source ssh/telent client for windows. Link http://kitty.9bis.net/ Kitty Screenshot. Features: Sessions filter Portability Session Launcher Automatic logon script URL hyperlinks Automatic password/commad Unfortunatelly, kitty doesn't have multi-tab feature. MTPutty (Multi-tabbed Putty) can be used as a containor for kitty/putty. This utility enables you to wrap unlimited number of kitty/putty applications into one tabbed GUI interface.  The combination of these two tools kitty+MTPutty gives you a strong controlled of kitty sessions and more power in your hand to handle a lot. Link http://ttyplus.com Example: Combination of kitty/putty + MTPutty Supports all kitty/putty protocols- SSH, telnet, Rlogin