Ubuntu Servers :: Useful Server Information - Php File - Runs A Few Commands And Echoes The Output
Jan 25, 2010
Php file that basically runs a few commands and echoes the output. It's for checking things like temperatures etc, space free.
You can see it in action here: [url]
I've attached the actual php file.
Two questions:
1) What more can I add to it to give me even more information?
2) I want to add hddtemp but it requires sudo to run. How can I get around this?
View 4 Replies
ADVERTISEMENT
May 19, 2010
I want to grab information from mediainfo and output it to a file with text already in it.
How would I do that?
Code:
#declaring the variables
filename=$1
DATE=`mediainfo "$filename" | grep "Recorded date" | awk -F" : " '{ print $2 }' | tr -d '
[Code].....
View 1 Replies
View Related
Sep 1, 2010
I have debian lenny, when I run an application is slow to load (example: iceweacel open and it takes, I can hold him iceweacel work normally), I tried to change from gnome to another and the same thing, went down some services (samba, squid) and nothing. I open a terminal and it takes, I want to duplicate it and do it fast. From a terminal without X (tty1) with root run mc and moves quickly, also run as root "sudo mc" and takes to boot.Any action done with sudo it takes to run.
Can not be what it takes to make starting the applications, not the PC because it is new, and from one moment to another I began to pass this
The sudoers file is fine, in the log's nothing unusual, since other PC take long to enter samba.
View 1 Replies
View Related
Sep 10, 2010
Consider this PHP Script or just skip to the Output:
Code
Code:
-bash-2.05b# cat myDate.php
#!/usr/bin/php -q
<?php
[code]....
View 10 Replies
View Related
Oct 12, 2010
I'm writing output of top command to a file However since top does not provide time I would like to append the 'date' command and then write all this to a file.
so something like top -d 1 -b; echo 'date' >>file
View 1 Replies
View Related
Oct 3, 2009
Consider the two runs of finger command for two different users:
Code:
[root@localhost ~]# finger root
Login: root Name: root
[code]...
View 3 Replies
View Related
Apr 18, 2011
I have a cron job like this.
04 07 17 04 02 sh -x myscript
this means the file myscript should be executed when the server date comes to Apr 17 on Tuesday at 07 04 am.
But the file myscript runs on every tuesday of April month.
View 6 Replies
View Related
Aug 3, 2010
I have a server running. I administer this server via ssh and sftp. Commands that are executed on the ssh prompt are killed when I close the ssh connection. Is it not?If I put a '&' or '&&' after it, will this process keep running when I close the ssh connection?In what other way could I start 'applications'/processes in the background? like rtorrent for example.
View 5 Replies
View Related
Apr 22, 2010
What type of server am I on? code...
View 3 Replies
View Related
Nov 19, 2010
I wanted to change authentication options in
1) /etc/pam.d directory files common-password, common-auth, common-account
2) /etc/login.defs - PASS* fields
I know the fields that need to be changed but what I could not find was
a) commands that change these options similar to useraddusermod and so on but those which can change system wide settings
b) API that can change these options (C API)
I have almost accepted that there in fact aren't such things. You have to manually update the files. I would prefer not though.So I am asking here as last attempt to find such commandsAPI. Please let me know if they are available.
View 1 Replies
View Related
Jul 13, 2011
I am not sure why this does not work..
tshark |grep 'string'
Gives me what I want but
tshark |grep 'string' >/tmp/outputfile
Gives me an empty file.
View 3 Replies
View Related
May 24, 2010
I am working on linux server with below specifications.Linux EDT 2008 i686 i686 i386 GNU/LinuxWhile checking the status of the server using the command 'opmnctl status' and when server is down the output is not getting redirected to file.I m using the command as,opmnctl status > abc.txt.
View 2 Replies
View Related
Apr 9, 2011
I like the server login information that gets displayed when you login to a 10.04 server. It lists disk usage, CPU usage, Temperature etc...
Unfortunately I had problems installing 10.04 from a USB. At the end of the process the master boot record was stored on the USB and not the hard disk.
But now when I login to my server I don't get the server information.
View 1 Replies
View Related
Nov 5, 2010
Im using this script to save a backup to a NAS, however i want to print the result to a file that later can be mailed to me.
Code:
tar --totals -czf - /var/www | ssh user@host "cat > /backup_path/`date "+%Y-%m-%d"`.tar.gz"
i have tried just adding ">> logfile.txt" at the end of the command, but that obviously does not work. How should i do this?
View 2 Replies
View Related
Jun 15, 2010
I have a ubuntu server running on a ten year old desktop and it runs great but i cant seem to change the video out put away from the normal anolog port to a TY port.My server is just for home use and I do not know the terminalThe reason I need to move to the other port is I do not have a screen for it but I do have a little old TV that will work.
View 2 Replies
View Related
May 24, 2010
In linux we can make it output bootstrap instructions,
what about windows?
View 2 Replies
View Related
Apr 27, 2010
I have currently 7 servers that report logwatch every day.Fact is that it's lot of information to process every day, I would like to have as short as possible overview of events happened in last 24h is only critical/warning information . It would be + if all servers output could be gathered in 1 email
View 2 Replies
View Related
Jul 31, 2009
I am getting different output of FTP commands in linux and unix. We are migrating an application from unix to linux.
The following output i am getting in unix and linux.
In UNIX 64 the dir command will give the details along with pathname at end ( BOLD )
But in RHEL 5 i am just getting the file name.
Is thery any way to get the pathname in dir command of FTP in RHEL 5.
View 2 Replies
View Related
May 3, 2010
My .jar file needs and uses some files in the same directory it's in (everything, including the jar was unzipped into said directory). It runs perfectly when I do java -jar file.jar in the command line, but there's trouble when I double-click the file when running from the file system manager. I've tried a custom command under properties ie java -jar, but the problem is that the .jar file doesn't seem to be able to use any of the files in the same directory. When running, the jar can't find any of the files that it needs.
View 5 Replies
View Related
Mar 16, 2010
rm -f /www/emailout/template.html
TODAY=`date '+%d-%m-%y'`
DBRUN=`ps ax | grep dtd `
sed -e 's/ncTODAY/'"$TODAY"'/g' -e "s/ncdbrun/'"$DBRUN"'/g" /www/emailout/test1.html > /www/emailout/template.html
But, I can't get the output of $DBRUN ?
View 14 Replies
View Related
Feb 23, 2011
I am working on the shell using c language. I just would like to ask when I run some command in the backgrounds, how can I allow interleave out? I want to the output like this:
shell> command1
shell> command2 &
shell> command3
[code]...
View 3 Replies
View Related
Jun 27, 2009
I recently upgraded my file/media server to Fedora 11. After doing so, I can no longer copy large files to the server. The files begin to transfer, but typically after about 1gb of the file has transferred, the transfer stalls and ultimately fails with the message:
"Error writing to file: Input/output error"
I've run out of ideas as to what could cause this problem. I have tried the following:
1. Different NFS versions: NFS3 and NFS4
2. Tried copying the files to different physical drives on the server.
3. Tried copying the files from different physical drives on the client.
4. Tried different rsize and wsize block sizes when mounting the NFS share
5. Tried copying the files via a different protocol. SSH in this case. The file transfers are always successful when I use SSH.
Regardless of what I do, the result is the same. The file transfers always fail after approximately 1gb.
Some other notes.
1. Both the client and the server are running Fedora 11 kernel 2.6.29.5-191.fc11.x86_64
I am out of ideas. Has anyone else experienced something similar?
View 13 Replies
View Related
Sep 29, 2010
have to create a webhost on an running fedora server which runs multiple webpages + a coldfusion serveri have to add an coldfusion virtual host to these.what i would do:*crate a new user & group*enter vhosts.conf and copy an existing host and modify it for the new one.*create an new folder and copy the main files (phpstarter and webroot) *chown the files for the right useri think an apache graceful would be needet
View 1 Replies
View Related
Oct 13, 2010
I have a launcher for Quake that essentially runs a shell scripts that runs quakespasm with certain options. Is there a way to add it to AWN?
View 6 Replies
View Related
Aug 4, 2010
I'm currently running Testing/Sid on my machine with Fluxbox as my window manager.Yesterday I noticed that I was not getting full output from commands using lxterminal.First off I tried another terminal,which was the xfce4-terminal.The result being exactly the same,missing output.I have also tried re-generating my xorg.conf,and yes you guessed it no change.Getting desperate I also tried dpkg-reconfigure console-setup,still missing output from lxterminal.So to sum up why do I get the full output with xterm but not lxterminal which I have been using previously for some time.
View 5 Replies
View Related
Apr 27, 2010
Which commands do you use to output the current users logged into the system and accessing a specific file?
View 5 Replies
View Related
Jan 25, 2011
I'm trying to write a python script that will use the current user's name when interacting. Ex: when started, it should say "hello daweefolk" when I am logged in.
I've tried
Code:
username=os.system("echo $USER")
but the variable remains empty.
What is the correct code?
View 1 Replies
View Related
Jan 19, 2010
I installed squid on my machine, and for a while it was starting up automatically when the computer would turn on, and I would only have to reconfigure on ip-up for the new dns, etc.Now for some reason, I notice that squid isn't even started.To fix this, I wrote a start up script in /etc/rcS.d/ that runs:/etc/init.d/squid3 startAnd I notice it still isn't starting.So I write "/etc/init.d/squid3 start" and put it in my ip-up.d/ script.Everything in the script is being executed, but the squid server.I've tried reinstalling squid... what am I missing? where does the computer start these services?
View 4 Replies
View Related
Jan 7, 2011
I'm planning to add 1tb sata disk to my lovely file-server under ubuntu 10.10,what i want is use this disk as additional storage for network user,indows and ubuntu?I mean when my ubuntu server down (worse case) I can easily take out the disk from ubuntu machine and plug in on windows machine
View 2 Replies
View Related
Jun 9, 2009
When I run yum list fedora runs through around 5-10 repos that it can never connect to what's the best way to remove these repos? And which repos are the most reliable?
View 5 Replies
View Related