# Show "top" on console w/o logging in.



## monty_hall (Apr 24, 2009)

Just wondering if it it possible.  I like having top running to monitor apache & mysql loads but would rather not leave the console logged in.

Regards,

Monty


----------



## MG (Apr 24, 2009)

I can't test it right now, but maybe you can redirect top to a different terminal.

```
top > /dev/tty??
```

Or write a shell script that updates the proc list instead of top in case top messes up your output screen.
something like this:


```
#!/bin/bash 
x=0
while [ $x -lt 10 ]; do
  top -n 25 > /dev/tty??
  sleep 1
  clear > /dev/tty??
  let x=x+1 
done
```


----------



## monty_hall (Apr 24, 2009)

top -n 25 > /dev/tty?? does work.  I fiddled w/ creating another account called top and changed the shell to top.  





			
				MG said:
			
		

> I can't test it right now, but maybe you can redirect top to a different terminal.
> 
> ```
> top > /dev/tty??
> ...


----------



## rocky (Apr 25, 2009)

monty_hall said:
			
		

> Just wondering if it it possible.  I like having top running to monitor apache & mysql loads but would rather not leave the console logged in.



I guess that you can do this by using Bash's prompt


----------

