Reading/Parsing a CRL with OpenSSL
Below command used to parse and give you a list of revoked serial numbers: openssl crl -inform DER -text -noout -in mycrl.crl Most CRLs are DER encoded, but you can use -inform PEM if your CRL is not binary. If…
MemSQL’s Kerberos setup with SSL
As of MemSQL 5.0, MemSQL includes an authentication plugin that enables a MemSQL Server to use PAM (Pluggable Authentication Modules) to authenticate users. PAM enables a system to use a standard interface to access various kinds of authentication…
MongoDB WT with ext4 Filesystem and its performance issues.
Currently MongoDB Inc., is lacking in a comprehensive explanation of the issues that can arise with WT when running on EXT4. Specifically, details on what the issue is, under what conditions it can manifest, and what the symptoms are. They’ve…
shell script to know all Linux configuration
Does anyone have shell script to know all Linux configuration on a VM ? [ root @dbversity : ~ ] cat /etc/*release* Red Hat Enterprise Linux Server release 6.6 (Santiago) 6.6.GSF-A0 SOE Linux Release 10/30/14 Red Hat Enterprise Linux Server…
Processing Apache logs using a Python script
[root@localhost apache2]# cat ../apache.py __author__ = ‘root’ #!/usr/bin/python import re import sys from datetime import datetime, date, timedelta from collections import Counter # Define the day of interest in the Apache common log format. try: daysAgo = int(sys.argv[1]) except:…
Python script to list all files, directories in a given path
[root@localhost utils]# pwd /root/Documents/dbversity/utils [root@localhost utils]# [root@localhost utils]# [root@localhost utils]# ll -lhtr total 20K -rw-r–r–. 1 root root 0 Jun 8 14:24 _init_.py -rw-r–r–. 1 root root 95 Jun 8 14:35 new_function.py -rw-r–r–. 1 root root 77 Jun 8 14:54…
[MongoDB]: To add mongod to Linux startup
mongod script: #!/bin/bash # mongod – Startup script for mongod # description: Mongo is a scalable, document-oriented database. # chkconfig: 35 85 15 MONGO_USER=mongod if [ `id -nu` != $MONGO_USER -a `id -nu` != “root” ]; then echo “Exiting –…
[Linux]: SSH between two EC2 hosts
Using username “ec2-user”. Authenticating with public key “imported-openssh-key” Last login: Fri May 8 12:23:16 2015 from 49.205.126.24 __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2015.03-release-notes/ 11 package(s) needed for security, out of 36 available Run “sudo yum…
[MySQL]: SysBench Installation procedure
SysBench: System evaluation benchmark Why ? The idea is to quickly get an impression about system performance for MySQL usage without setting up complex benchmark and even without installing MySQL. In some cases this is very helpful. This is also the…
[MongoDB]: Sharded cluster script
Shell script to run a 3 sharded cluster (3 ReplicaSet) on a single server. [root@dbversity.com bin]# cat shard_creation_script.sh ##### Killing the existing Mongo processes ################ for i in `ps -ef | egrep ‘shardsvr|configsvr|replSet|configdb’ | grep -v egrep | awk -F”…