It may be bug 6970542
Try setting:
export DTRACE_DOF_INIT_DISABLE=1
I've seen that problem on a number of test machines which were working normally and then started to get really slow startup times. On JDK 1.6.0_26 it works properly again.
sort -t' ' -k2.7,2.10n -k2.4,2.5n -k2.1,2.2n -k3
If you have control of the original script so you can print the date as YYYY-MM-DD then it would sort naturally so we would not need to pick apart the year, month and date fields in the sort command, but could just use -k2 in the same way we just use -k3 for the timestamp.
Or if I have counted your fixed width format correctly,
sort -k1.28,1.31n -k1.25,1.26n -k1.22,1.23n -k3
Or if you are not using fixed widths and have variable white space, then (-b
to ignore spaces but note no -n
)
sort -b -k2.7,2.10 -k2.4,2.5 -k2.1,2.2 -k3
Or to sort only part of the file (and really it would be a lot easier simply to alter the program creating this data in the first place):
(head -2 file; /usr/xpg4/bin/tail -n +3 file |sort -b -k2.7,2.10 -k2.4,2.5 -k2.1,2.2 -k3)
Best Answer
See: need high performance /bin/sort; any suggestions?