Posts

Showing posts from June, 2007

Unix Debugging Cheat Sheet

pmap To check the memory address mapping of the core dumped process. e.g. 036AA000 2592k [heap] So, it means 036AA000 and above is heap address. FFB3A000 [stack] And likewise. Also can be used to check shared memory, shared libraries used and etc. truss -d -o -p System API trace. gcore - o Force core dump Use dbx later to investigate the core file. pstack call stack. ps -ef getting running process PID. Monitor system log file. tail -f /var/adm/SYSLOG tail -f /var/adm/messages tail -f /var/log/syslog ls -l /proc/ /as ps -p -o pmem,vsz,osz,rss,pid To check memory usage. pldd check dependencies pargs check all arguments passed to process. Note: arg[0] is always the process execution path like even Win32. Useful also if the ls -l return truncated path.

Excel VBA for conditional formatting.

Sub CreateConditionalFormatting() Dim column As String column = "C" Dim NoOfRowNeeded As Integer NoOfRowNeeded = 3000 Dim j As Integer Dim cellSelect As String For j = 1 To NoOfRowNeeded cellSelect = column & CStr(j) Range(cellSelect).Select Selection.FormatConditions.Delete If (j - 1) < 1 Then Range(cellSelect).Interior.ColorIndex = 4 Else 'maximum 3 formula allowed. Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=INT(" & column & CStr(j - 1) & ") Selection.FormatConditions(1).Interior.ColorIndex = 3 Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=INT(" & column & CStr(j - 1) & ")>INT(" & column & CStr(j) & ")" Selection.FormatConditions(2).Interior.ColorIndex = 6 Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=INT(" & column & CStr