Posts

Showing posts from February, 2016

Directory ( LDAP )

1. DNvs. RDN DN is globally unique RDN : unique under same parent. RDN is typically a unique identifier ( id or uid ) attribute for an entry.  DN  =   RDN + Path to Parent 2.  ldap errorcode=10 I was having  connection to read replica and was trying to update an attribute in LDAP was resulting in this error. 3. Starter Query dirsrv]# ldapsearch -x -h <host>  -D '<UserDN>' -w  password -b '<BaseDN>' '(&(uid=91203074))' uid cn 4.   At times when you execute a query which may result in large result set and  if nsslapd-sizelimit is set to smaller value , it wont return any results.  This limit is set is /etc/dirsrv/slapd-{ServerName}/dse.ldif. 5. To find the number of entries under  a DN ldapsearch -u -D "cn=Directory Manager" -h ldapserver -p 389 -b "ou=myou,c=myc,o=myo" -w password  -s base "(objectclass=*)" numsubordinates 6. To add an aci     ./ldapmodify -h localhost...

UNIX/LINUX

1. Use Ctrl+D for specifying EOF for stdin. 2. Removing the files returned by svn status command. svn status | awk '{cmd = "rm " $2; system(cmd)}' 3. To find the Linux distribution on the machine more /etc/*-release 4.  top, htop, iotop,sysstat  for seeing the system usage. 5.  jstack   for seeing the threads inside a java process 6. In LDAP access log , to print all the lines which has etimes greater than 10 ms and also print next line if it has "SRCH" into it, use following command awk -F= '/etime/ && $7>0.02000 {print FNR; print;getline; print FNR;if (match($0,"SRCH")) {print}}'  access 6.1  To list all the lines which have etime > 1000 ms   awk -F"etime=" '$2>1000 {print }' access 7.  In LDAP access log, print the previous line and the line where etimes greater than 10 ms. awk -F= '/etime/ && $7>0.01000 { print line;print;} {line=$0}'  access 8. Su...