I haven't tested it, but it looks good to me - Provided the command(in your example, /usr/bin/top, correct?) has root privs.