memtime - Show the time and memory used by a command
memtime [−t period] [−e] [−m maxkilobytes] [−t maxseconds] command [arg...]
The memtime program invoke command with the parameters arg, wait for its completion and print an estimation of the time and memory used by command. In addition user can specify time and space limits by maxseconds and maxkilobytes to limit resources available for this process.
memtime accept
the following options:
−t period
Print an estimation of the currently used resources every period seconds.
−e |
Echo command and arg. |
−m maxkilobytes
Memory limit for command. Implemented through RLIMIT mechanism.
−c maxcpuseconds
User time limit for command. Implemented through RLIMIT mechanism.
The update period is only approximate.
The memory information is collected by sampling, and the precision might not be good for commands with short execution time.
Copyright © 2000 by Johan Bengtsson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Johan Bengtsson <johanb@Update.UU.SE>
Memory and time restriction functionality added by Juhan Ernits <juhan@cc.ioc.ee> in December, 2001.