Sponsored Content
Top Forums Shell Programming and Scripting two questions about incorporating fortune and java uptime into screen for a minecraft server Post 302680813 by Corona688 on Thursday 2nd of August 2012 10:43:47 AM
Old 08-02-2012
You edit a post by clicking the edit button.

Code:
VAR=$(ps -C java|awk 'FNR == 2 {print $3}')
OLDIFS="$IFS"
IFS=":"
set -- $VAR
IFS="$OLDIFS"

echo "$1 days $2 hours $3 minutes"

I don't know enough about screen to add much about your other question.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calculate server uptime in % (99.98), using ksh script

Let me preface by saying, I have looked through many threads that deal with keep the decimal, however I'm not sure that any one resolution meets my needs, ok, ok, they could. So maybe it's just that I am not understanding the resolution - therefore I am posting a new thread. myknowledgebase=at... (2 Replies)
Discussion started by: cml2008
2 Replies

2. Solaris

Server uptime statistics

Hello, I would like to create a report every month about the working hours of some servers. I need to get results such as how long are the servers up every month, which hours/days are up. Do you know any tool which will help me? Thanks in advance (2 Replies)
Discussion started by: @dagio
2 Replies

3. Shell Programming and Scripting

Total number of users logged in a server from uptime

how to find out total number of users logged in a server from uptime . i mean to say i need the total output of unix command . who gives the out put at a particular time . I need at all time from which machine who has connected , (3 Replies)
Discussion started by: amiya.te@gmail
3 Replies

4. Shell Programming and Scripting

Extract the uptime from the output of the uptime command

Hi! I want to extract the uptime from the output of the uptime command. The output: 11:53 up 3:02, 2 users, load averages: 0,32 0,34 0,43 I just need the "3:02" part. How can I do this? Dirk (6 Replies)
Discussion started by: Dirk Einecke
6 Replies

5. Linux

uptime command output when the server is running more than one year?

What is the uptime command output when the server is running more than one year? My doubt is whether it show in number of days format or number years and number of days format? For example, Assume the server is running 400 days 3 hrs 3 min 3 secs. The output like 400 days 3:3 min or 1 year 5... (3 Replies)
Discussion started by: maruthu
3 Replies

6. Shell Programming and Scripting

Help with script that reads and writes java console Minecraft

Hi I am looking for an easy way to lock game mode (0) for everyone included op on a Minecraft server. It can be a script that every time a player changes game to 1 the script changes back to 0. What the player writes is visible in the java console. I am not good at script programming and my... (0 Replies)
Discussion started by: MyMorris
0 Replies

7. Red Hat

Server uptime is showing 0hr but server not rebooted

Hi One of our server is showing the uptime 0hr 5mints there is no log in /var/log/messages there is no log in command "last" kernel version is 2.4.9 (RH2.1 AS) What could be the reason for this. is this issue is related to uptime counter reached max how to verify this. Best Regards KVK (4 Replies)
Discussion started by: venikathir
4 Replies

8. Windows & DOS: Issues & Discussions

Disable minecraft by disabling java

my kids are on minecraft constantly. I want to restrict its use but it seems impossible since it runs on java. :eek: They are using :mad: windows 7 :mad: but I'm asking this question on here since Java is platform independent (er right?):confused: Also this forum was very helpful with my AWK... (10 Replies)
Discussion started by: cmp260
10 Replies
ns_info(3aolserver)					    AOLserver Built-In Commands 				       ns_info(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_info, ns_server, ns_stats - commands SYNOPSIS
ns_info address ns_info argv0 ns_info boottime ns_info builddate ns_info config ns_info home ns_info hostname ns_info interp ns_info label ns_info log ns_info name ns_info pageroot ns_info platform ns_info server ns_info tcllib ns_info uptime ns_info version ns_server option ?arg arg ...? ns_stats option ?arg arg ...? _________________________________________________________________ DESCRIPTION
ns_info boottime Returns the server boot time in seconds. ns_info config Returns the configuration file name. ns_info home Returns the directory where the AOLserver was installed. ns_info hostname Returns the name of the host on which server is running (e.g., www.myhost.com). ns_info interp Returns the number of the Tcl interpreter currently being used. ns_info label Returns the source code label for the server. If no label was used, "unlabeled" is returned. ns_info log Returns the location of the server log file (e.g., /home/myserver/log/server.log). ns_info name Returns the name of the AOLserver. It's usually "AOLserver." ns_info pageroot returns the directory containing the HTML pages for this virtual server. ns_info platform Returns the name of the platform that the server is running on (e.g., Solaris). ns_info server returns the name of this virtual server. ns_info tcllib returns the directory where the AOLserver Tcl source code resides for this virtual server. ns_info uptime returns the time in seconds that the server has been up. ns_info version returns the version of the AOLserver. SEE ALSO
nsd(1), info(n) KEYWORDS
AOLserver 4.0 ns_info(3aolserver)
All times are GMT -4. The time now is 03:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy