Hello Everyone,

I have a bash Script of FastQC and Trimmomatic. I want to know how much resources each of these tool uses. So is there any way or any bash command or tool which helps with this situation. 
If possible I would like to change the resources they use to make them perform faster.

Thank you, Nikhil
You cannot really 'change the resources' they use unless the tool itself has options for the number of threads/memory usage etc.

The only real changes you could make that might marginally speed something up would be to parallelise it with `gnu parallel` (if possible), or maybe change the [`niceness` of the process][1].

As Dariober said, there are not really many options in 'default' tools to monitor resource usage other than at the overall system level once a script is running (e.g. `free`, `htop/top` and `ps` etc). You would have to look at installing some sort of server monitoring solution, but its probably not worth the effort. There are some tools here, but even they are not 'in-script' measures https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/


You can 'profile' your commands by using `time` to figure out where the slow bits are, but unless your code is very inefficient you won't be able to do much to change it.



  [1]: https://askubuntu.com/questions/656771/process-niceness-vs-priority