0

whose using my ports ?

When troubleshooting applications you will sometimes need to find out what process is using your ports so that you can isolate it or kill it or readjust it so that it will work better with other applications on the same server. lsof is always the best method to see what is running on various ports however there is also an alternative. lets do lsof first lets say you want to find out what is running on port 8400 since it states that the port is open via netstat netstat -an | grep 8400 tcp 0 0 0.0.0.0:8400 0.0.0.0:* LISTEN so… Continue Reading

0

Dell OMSA 101 – mirroring and bootstraping

If you have a environment that has a lot of dell servers and want to get storage and chassis information OMSA is the way to do it. If your machines have access to the internet you can easily download it from linux.dell.com and install it however if you have a good number of servers and/or do not have access to the internet via your servers you will most likely want to mirror the repository so that you can install it from your trusted host. In this post we will assume that we have a trusted host that has access to… Continue Reading

0

SSH Keys 101

If you have a centralized server where you manage many remote servers on you will most likely want to setup ssh keys so that you would not have to type in your password everytime. ssh comes with many utilities to generate handle and manage keys. this article will talk mainly about ssh-keygen, ssh-agent, ssh-copy-id, and ssh-add. Lets say you want to generate your keys you will issue ssh-keygen which will default to rsa or you can specify dsa by typing ssh-keygen -t dsa. It will prompt you for a passphrase to use. You will always want to select a passphase… Continue Reading

0

Cool AWK trick – remove duplicate lines without sort

I always do something like cat file | sort -n | uniq to get a unique listing of a file to remove duplicates. the only problem with this is that it sorts the list so the ordering of the file is lost.. found a cool trick with AWK today of removing duplicate lines without destroying the order and yet its just a one liner! awk ‘!a[$0]++’ file lets take an example $ cat abc ddd bbb eee fff aaa ccc bbb kkk aaa zzz xxx yyy now : $ awk ‘!a[$0]++’ abc ddd bbb eee fff aaa ccc kkk zzz… Continue Reading

0

DNSMASQ – home network changes

Desided to make some changes to the home network using dnsmasq. dnsmasq is a light weight dns cache/dhcp/tftp server that is easy to configure and manage and does not require a large footprint as far as memory or cpu. In my home network I have a main router which acted as a wireless access point and dhcp server which plugs into my MOCA network and to the gigE switch for the wired machines. I have another wireless AP on the MOCA network to extend my wireless footprint. dnsmasq pretty much works right out of the box however I wanted to… Continue Reading

0

Find deleted open files

When your disk usage does not match the usage summary or when you have a full filesystem yet you’ve removed the files you are most likely dealing with open files. To find open files use lsof +L1 and kill the PID so that the space will be freedup

0

Packet Analyzer: 15 TCPDUMP Command Examples

Thanks the geek stuff tcpdump command is also called as packet analyzer. tcpdump command will work on most flavors of unix operating system. tcpdump allows us to save the packets that are captured, so that we can use it for future analysis. The saved file can be viewed by the same tcpdump command. We can also use open source software like wireshark to read the tcpdump pcap files. In this tcpdump tutorial, let us discuss some practical examples on how to use the tcpdump command. 1. Capture packets from a particular ethernet interface using tcpdump -i When you execute tcpdump… Continue Reading

0

Oracle Database Startup and Shutdown Procedure

thanks the geek stuff How To Startup Oracle Database 1. Login to the system with oracle username Typical oracle installation will have oracle as username and dba as group. On Linux, do su to oracle as shown below. $ su – oracle 2. Connect to oracle sysdba Make sure ORACLE_SID and ORACLE_HOME are set properly as shown below. $ env | grep ORA ORACLE_SID=DEVDB ORACLE_HOME=/u01/app/oracle/product/10.2.0 You can connect using either “/ as sysdba” or an oracle account that has DBA privilege. $ sqlplus ‘/ as sysdba’ SQL*Plus: Release 10.2.0.3.0 – Production on Sun Jan 18 11:11:28 2009 Copyright (c) 1982,… Continue Reading

0

9 Linux ethtool Examples to Manipulate Ethernet Card (NIC Card)

Thanks to the geek stuff 1. List Ethernet Device Properties When you execute ethtool command with a device name, it displays the following information about the ethernet device. # ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: d Wake-on: d Link detected: yes This above ethtool output displays ethernet card properties such as speed, wake on, duplex and the link detection… Continue Reading

0

Linux modprobe Command Examples to View, Install, Remove Modules

Thanks to the geek stuff modprobe utility is used to add loadable modules to the Linux kernel. You can also view and remove modules using modprobe command. Linux maintains /lib/modules/$(uname-r) directory for modules and its configuration files (except /etc/modprobe.conf and /etc/modprobe.d). In Linux kernel 2.6, the .ko modules are used instead of .o files since that has additional information that the kernel uses to load the modules. The example in this article are done with using modprobe on Ubuntu. 1. List Available Kernel Modules modprobe -l will display all available modules as shown below. $ modprobe -l | less kernel/arch/x86/kernel/cpu/mcheck/mce-inject.ko… Continue Reading