find <directory-path> -type f -size +20000k -exec ls -lh {} \; 2> /dev/null | awk '{ print $NF ": " $5 }'
Monday, 30 November 2015
Sunday, 29 November 2015
Friday, 27 November 2015
Get List of all user agents
cat /var/log/access-log-file.log | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn | head -n20000 > /home/output-file-path.txt
If log is in gz format
zcat /var/log/access-log-file.log | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn | head -n20000 > /home/output-file-path.txt
If log is in gz format
zcat /var/log/access-log-file.log | awk -F'"' '{print $6}' | sort | uniq -c | sort -rn | head -n20000 > /home/output-file-path.txt
Tuesday, 3 November 2015
Start logstash
Logstash agent (forwarder)
/usr/local/logstash/bin/logstash -f /etc/logstash/agent.conf agent &
Logstash
/usr/local/logstash/bin/logstash -f /etc/logstash.conf
/usr/local/logstash/bin/logstash -f /etc/logstash/agent.conf agent &
Logstash
/usr/local/logstash/bin/logstash -f /etc/logstash.conf
Tuesday, 27 October 2015
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error
Just in case you encounter the error and some important data cannot be discarded on the running redis instance (someone changed permissions for the
rdb file or its directory incorrectly, or running out of disk space), you can always redirect the rdb file to be written somewhere else.
Using
redis-cli, you can do something like this:CONFIG SET dir /tmp/some/directory/other/than/var
CONFIG SET dbfilename temp.rdb
After this, you might want to execute a
BGSAVE command to make sure that the data will be written to the rdb file. Make sure that when you execute INFO, bgsave_in_progress is already 0(either the operation is successful or there is an error encountered). After that, you can now start backing up the generated rdb file somewhere safe.
If above method doesn't work, try this
config set stop-writes-on-bgsave-error no
Apache Proxy configuration file
<VirtualHost *:80>
ServerName filter.whatshot.in
ProxyRequests off
TimeOut 0
#ProxyTimeout 0
KeepAliveTimeout 0
#ProxyRequests off
#ProxySet timeout=1800
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
#ProxyTimeout 0
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
</VirtualHost>
ServerName filter.whatshot.in
ProxyRequests off
TimeOut 0
#ProxyTimeout 0
KeepAliveTimeout 0
#ProxyRequests off
#ProxySet timeout=1800
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
#ProxyTimeout 0
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
</VirtualHost>
Wednesday, 7 October 2015
How to install Redis 3.x on new CentOS 6.6 server
Pre installation Redis
#update and upgrade the linux
yum -y update
yum -y upgrade
#I like nano
yum install -y nano
#Install gcc & tcl, needed for compilation
yum install -y gcc*
yum install -y tcl
Install Redis
wget http://download.redis.io/releases/redis-3.0.1.tar.gz
tar xzf redis-3.0.1.tar.gz
cd redis-3.0.1
make
make test
make install
cd utils
chmod +x install_server.sh
./install_server.sh
Check Redis status/start/stop
nano /etc/redis/6379.conf
# find # requirepass foobared
#replace it with your password
requirepass somePassword
service redis_6379 restart
Subscribe to:
Posts (Atom)