With a large amount of data, it can be useful to sort the output on a certain set of criteria, such as the number of times a command is run or the amount of time a command is running. This allows you to quickly see which commands or programs are the most popular or which commands may be running too long. One of the most powerful features in bbana is its ability to sort the data using the output fields as keys. This menu has been designed to be as intuitive as possible but it may require a little practice to get used to it.
bbana allows you to set two characteristics for each key
It is also important to note that you may choose any field in your output as a sort key regardless of whether you have chosen to include that field in your output. Fields which are not included in your output can be thought of as hidden keys. You will not see them in your output but you will notice their effect.
Initially, none of the fields are chosen as sort keys and hence there is no sorting done on the output. The submenu looks like this
As was said above, it may take a little practice getting used to the sorting rules. Therefore, as you see, the rules are included on the menu. The sorting rule is specified using the format n[a,d] in the box behind each field where n refers to the order in which the field will be used in the sort (1=first, 2=second, 3= third, etc.) and then an a or a d to indicate you want the field to be sorted in ascending (increasing) or descending (decreasing) order.
For our example, let's assume we want to sort the data according to the following criteria:
So, we want to sort on the date first, then on the hour to see how the data changes with time and then on the number of instances in such a way as to see the most popular commands first and the least popular later. Therefore, we place a 1a behind the Date field, a 2a behind the Hour field and a 3d behind the Number of Instances field. The screen should now look like
If you make a mistake, you can use the Tab key or the up and down arrows to move between the fields and then the left and right arrows and the Backspace or Delete key to modify the type of sort. When you are finished, just hit the Enter or Return keys to save your choices.
So long as you continue in the same analysis, the choices you make will remain the same until you have changed them.