Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sep 7, 2022

fail2ban unban command

fail2ban-client -i
then in interactive mode type read the status of a jail:
status sshd
you'll get:
Status for the jail: ssh
|- Filter
|  |- Currently failed: 0
|  |- Total failed: 3
|  `- File list:    /var/log/auth.log
`- Actions
   |- Currently banned: 1
   |- Total banned: 2
   `- Banned IP list:   192.168.0.100
then type in fail2ban interactive mode:
set sshd unbanip 192.168.0.100
you'll get:
192.168.0.100
it means no longer 192.168.0.100 in ban list.

Aug 3, 2016

SOLVED: Java 32bit error on 64bit CentOS :: ld-linux.so.2 libmawt.so libXtst.so.6

Attempts to run 32bit Java on a 64bit system, the following errors would display:

/XXXXXXX/runtime/LNX86/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Exception in thread "main" java.lang.UnsatisfiedLinkError: /XXXXXXXX/runtime/LNX86/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory

To fix, install the following (tested on CentOS7):

sudo yum install glibc.i686
sudo yum install libXext.i686
sudo yum install  libXrender.i686
sudo yum install  libXtst.i686

Now you should be able to run the Java application.

Mar 16, 2009

SSD Tweaks for less I/O from eeeUser

The following post was copied from: http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization

Even less disk IO

http://forum.eeeuser.com/viewtopic.php?id=5984.

On machines with a swap partition add the following to:
> sudo mousepad /etc/rc.local

Put these two lines just before the “exit 0” statement at the end:
sysctl -w vm.swappiness=1           # Strongly discourage the swapping of application data to disk
sysctl -w vm.vfs_cache_pressure=50 # Don't shrink the inode cache so aggressively.
This reduces the likelihood of the actual applications, or directory listings, from being paged out. Disk page cache is not nearly as important as random access SSD reads are faster than on HD. As a by-product the above will improve the responsiveness for interactive use (which is the primary use of the EEE), although reducing the overall performance of the system.

Or you can avoid changing the script and edit /etc/sysctl.conf instead. Change the last line to be

vm.swappiness=1

then add the line

vm.vfs_cache_pressure=50

Add noatime to your fstab

By default Linux ext2/3 keeps a tab on access times for every file on the system. This leads to more writes than we need. Add “noatime” to the options for the / mount as shown below.

> sudo mousepad /etc/fstab
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/sda1
UUID=10d03d2a-7732-4f6f-924f-541b39dd9559 / ext2 defaults,noatime,errors=remount-ro 0 1
#/dev/sdb1 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
You will need to reboot or run …

sudo mount -o remount /

On newer kernels, “relatime” provides much the same advantages while maintaining higher compatibility (some mail clients rely on atime).
Use ramdisk for temp files

RAM-based temporary file systems

This saves SSD disk space and reduces the number of writes to the SSD, which will maximise its lifetime and provide a very small improvement to system performance.

Edit /etc/fstab again

> sudo mousepad /etc/fstab

and add these lines to the end
# enable RAM-based temporary file systems
tmpfs /var/tmp tmpfs noatime 0 0
tmpfs /tmp tmpfs noatime 0 0
This means that anything stored in /var/tmp or /tmp won't survive a reboot. If you're debugging a problem where you need to preserve those files e.g after a crash, then you can temporarily comment out those lines.

.