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
MKOCTFILE(1)						      General Commands Manual						      MKOCTFILE(1)

NAME
mkoctfile - Compile dynamic-load modules for GNU Octave SYNOPSIS
mkoctfile [-IDIR] [-DDEF] [-lLIB] [-LDIR] [-M|--depend] [-c] [-o FILE|--output FILE] [-p VAR|--print VAR] [-s|--strip] [-v|--ver- bose] [-h|-?|--help] file ... DESCRIPTION
mkoctfile is used to compile source C, C++ or Fortran source code in dynamically loadble file for octave(1). OPTIONS
mkoctfile accepts the following options: -IDIR Add include directory DIR to compile commands. -DDEF Add definition DEF to compiler call. -lLIB Add library LIB to link command. -LDIR Add library directory DIR to link command. -M|--depend Generate dependency files (.d) for C and C++ source files. -c Compile but do not link. -o FILE|--output FILE Output file name; default extension is .oct. -p VAR|--print VAR Print configuration variable VAR. Recognized variables are: CPPFLAGS CPICFLAG INCFLAGS CXX F2C CXXFLAGS F2CFLAGS CXXPICFLAG F77 XTRA_CFLAGS FFLAGS XTRA_CXXFLAGS FPICFLAG SHLEXT CC SH_LD CFLAGS SH_LDFLAGS -s|--strip Strip the output file. -v|--verbose Echo commands as they are executed. file Compile or linke file. Recognised file types are .c C source .cc C++ source .C C++ source .cpp C++ source .f Fortran source .F Fortran source .o object file .SH SEE ALSO .BR octave (1). AUTHOR
John W. Eaton <jwe@bevo.che.wisc.edu> This manual page was contributed by Dirk Eddelbuettel <edd@debian.org> for the Debian GNU/Linux distribution but may be used by others. GNU Octave 1 November 2002 MKOCTFILE(1)
All times are GMT -4. The time now is 08:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy