Attached is the log file that I have generated through the following script:
But now I'm unable to run the following operations on it:
1. Count number of distinct users logged in & display their name and IP
2. Count number of users logged in at a particular time & display their name (How to take the input of time)
3. Count number of users logged in between a particular time by taking input of the time intervals.
As I want to give input of Time Intervals by myself and then count and display the users logged at that time. I'am having difficulties in doing so.
You did not mention your operating system and shell, so I am assuming Linux and bash here. Please note that under different OS and/or shell, you may need to tweak the commands a little:
#1)
As to #2, when you say "particular time" do you mean a fixed date and time, like Apr 21 18:46?
Assuming that you want to filter by month and day, you can do something like this:
1. The problem statement, all variables and given/known data:
Show all users who are currently logged in, sorted from earliest to latest log in time. The log in time includes the month, day, and time.
2. Relevant commands, code, scripts, algorithms:
finger, who, sort, pipe, head, tail,
... (8 Replies)
I have this task : Check the logintime.txt every minute to only allow user to log in at the specified time.
logintime.txt has the following content: USER TIME_START TIME_STOP
Example:
john 17:00 18:00
My idea is locking the user at the TIME_STOP and unlocking at the TIME_START
while... (4 Replies)
how do i start with this guys?
Sample run:
$ LOGTIME it2015678 <enter>
User it2015678 is CRUZ Tommy H
And has logged on to the system for:
8 hours
12 minutes
from the time this script was run. (1 Reply)
hi,
Do anybody know, how to list out all the commands & scripts used by the user & root along with the timestamps under ksh & csh shells.
Thanks in advance
Regards
BS (1 Reply)
I'm not sure if this query is relevant to this forum but here goes anyways...
I want analyse log files that do not appear to be of standard format. I have tried using Analog but cannot config it to read the files.
Does anyone have any advice on working with log files taken from a Unix... (6 Replies)
Is it possible to track the progress of a job (informatica) by analysing the progress of it's log file ? I have a long running job, and no way of tracking how far allong it is. Thanks. (4 Replies)
I am facing the following issue when using db2. The JDBC prepared statement command is sending an incorrect value to the database for search. I did a truss on the app and here is the log. I want to know what is the value that is getting passed. is it possible.
26867/68: send(62,... (2 Replies)
I just installed Solaris 6/10 without any problems but I didn't connect the network cable when I installed it.
Here are my problems:
-I can access webpages using IP addrsses but not with domain names
-ssh is installed but it is not running ('ps -e | grep sshd' didn't show it)
I have been... (4 Replies)