Difference between revisions of "Centos"

From KeegansWiki
Jump to navigation Jump to search
Line 69: Line 69:
 
==Check High Mem Usage==
 
==Check High Mem Usage==
 
''ps auxf | sort -nr -k 4 | head -10''
 
''ps auxf | sort -nr -k 4 | head -10''
 +
==Set up X11 Forwarding==
 +
* yum install xorg-x11-apps xorg-x11-xauth
 +
* Verify ''X11Forwarding yes'' in /etc/ssh/sshd_config
 +
* ssh -X hostname

Revision as of 08:25, 26 May 2011

bugs

NFS mount permission denied

Error:

[root@traderdirect ~]# mount 10.93.138.18:/nfs-shares /mounts/tdstorage/
mount: 10.93.138.18:/nfs-shares failed, reason given by server: Permission denied

Solution: /bin/mount -t nfsd nfsd /proc/fs/nfsd See: this bug report

df and du do not match

When a disk is full but nothing shows up as taking up a lot of space (according to du) then it's possible files were deleted before they were closed.

To determine if this is the case, run this command: lsof 2>/dev/null | grep deleted then restart the offending process.

General

Add Swap

TO add a 4 gig swap:

  • dd if=/dev/zero of=/swapfile bs=1M count=4096
  • mkswap /swapfile
  • swapon /swapfile

Then add the following to /etc/fstab:

  • /swapfile swap swap defaults 0 0

Kernel Parameters for Oralce

  • Put in /etc/sysctl.conf
  • sysctl -a will list current parameters
  • sysctl -p /etc/syscth.conf will reload new parameters
kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

fs.file-max = 6815744

See more here

Changing hard & soft file limits

  • Edit /etc/security/limits.conf

Ethernet Interface Details

[root@host ~]# 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: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes

Add EPEL Repo

Check High Mem Usage

ps auxf | sort -nr -k 4 | head -10

Set up X11 Forwarding

  • yum install xorg-x11-apps xorg-x11-xauth
  • Verify X11Forwarding yes in /etc/ssh/sshd_config
  • ssh -X hostname