Software :: Audit Tool In System To Count Number Of Times It Run?

Dec 30, 2009

I'm the POC for all my families Linux computers. Is it possible to get statistics on which programs are accessed, how frequently, for how long and by which user?

When it comes time to upgrade it would be useful so I know which programs to concentrate my testing. I usually just e-mail and ask but every time people forget to send me the programs they actually use.

View 2 Replies


ADVERTISEMENT

Programming :: Count Number Of CD-ROMs On A System Using Shell Script

Apr 7, 2010

I am trying to get the count of number of CD-ROMs attached with my Linux system using a bash shell script. I have decided to use the following method for it:

Code:
debian:~# cat /proc/sys/dev/cdrom/info | grep "drive name:"
drive name: sr0 hdb

So basically I know that there are two CD-ROMs attached to the system. Now there can be three also like this:

Code:
debian:~# cat /proc/sys/dev/cdrom/info | grep "drive name:"
drive name: sr0 sr1 hdb

All I want to do is in my shell script to get the count of the devices in a variable using the above command.

View 2 Replies View Related

General :: Command Line - Count Number Of Folders In A Drive Using System?

Apr 9, 2010

I need to organise an external HDD such that there is no more than 500 folders on it.

Ubuntu's "Properties" pane shows only the file count, not the folder count.

Is there a simple CLI line that will tell me the number of subdirectories?

View 3 Replies View Related

General :: Count How Many Number Occurrences In Series?

Jun 2, 2011

i try to make a script in bash that u choose a number for example 501 and another number like 1 and find how much the 1 number repeat in all numbers from 1 to 501 for example 11 -->1 repeat 2 times.in 1 to 501 the number 1 repeat 200 times.

View 4 Replies View Related

Programming :: Count The Number Of Slashes In Each Line?

Jan 18, 2010

I have a file with lines that look like this:

Dev/7_Texas2004/4_Caves/page.htm
Dev/7_Texas2004/5_SanMarcos/page.htm
Dev/7_Texas2004/6_Austin/page.htm

And I'm trying to count the number of slashes in each line. I figured (with my limited knowledge of bash) that the best thing to use would be sed. So I ran this to print "not /": sed '!s////g' file # and eventually adding " | wc -m" to it. and I got the same result as if I ran cat, no modification at all:

[Code]...

View 7 Replies View Related

General :: Count The Number Of Lines In All Files In This Directory?

Jul 5, 2011

I want to count the lines of all files in this directory and all its subdirectories, but exclude directories "public", "modules", and "templates".

View 2 Replies View Related

Ubuntu :: Count The Number Of Lines That Are Unique To The File?

Jan 21, 2010

I recently found myself in possession of a large file (a few million lines in length) of short strings and would like to count the number of lines that are unique to the file. I thought this would be an easy process, but while working on the problem, I encountered the following. Can anyone explain this weird result to me?

Code:
alaric@alaric-laptop:~/Documents/Programming$ grep '^string$' file.txt | uniq | wc -l
1

[code]....

View 1 Replies View Related

Ubuntu :: Count The Largest Number Of Repeating Characters?

Jul 12, 2010

I'm trying to find a script that will return me the largest number of repeating characters. Say, I have the following line in a text file: 12345AAAAA6789AAA

I want it to return 5, because "A" is repeated 5 times in this line (more than 3 at the end).

View 6 Replies View Related

General :: Count The Right VGA Parameter Number For Grub To Use Another Resolution?

Dec 13, 2010

I am using grub of version 2, and current resolution vga=795 (probably). X runs at 1680x1050. So what I would like to know is, how can I count the right VGA parameter number for grub, to use another resolution?

View 11 Replies View Related

General :: Trying To Display Count Of Number Of Subdirectories In Directory

Feb 7, 2011

I am a noob and I am trying to display a count of the number of subdirectories in a directory. I have been able to use find -type d to list directories and subdirs but I want a numerical value of dirs and subdirs. I know ls -l gives a count but when I try ls -l -d all it shows is "." I also have tried a combination with the -R option but nothing seems to be working for me.Please forgive my ignorance but I am working on a script for class and this is the first step.

View 3 Replies View Related

Programming :: Count The Number Of Occurrence Characters In A String ?

Jan 26, 2011

How do I count the number of occurrence characters in a string in an efficeint way ?

How do I reverse the words in a string with out using temp variables if possible . (if not possible use temp variables ?

Why do I specify dependedcies for header files in the Makefile ?

View 2 Replies View Related

General :: Count Total Number Of Lines Of Found Files?

Mar 20, 2011

I'm running a find. -name pattern to find some files, and I'd like to elegantly get the total number of lines in these files. How can I achieve that?

View 4 Replies View Related

Ubuntu :: Create A Script To Count The Number Of Lines From A Text File?

Dec 17, 2010

I need to create a script to count the number of lines from a text file . The output must be put on another text file (no_lines.txt) and in this file i need to generate from the script this output :"File $FILE has $NO_LINES lines ".

View 3 Replies View Related

Ubuntu :: Large Number Of Files To Count - Argument List Too Long

May 28, 2011

I have the standard problem of trying to count a large number of files in a directory (>100k)

I have tried: ls ~/user/images/* -l | wc -l and find ~/user/images/* -maxdepth 1 -type f | wc -l

In both cases, I get the argument list too long error message.

I have tried using xargs but I can't seem to get it to work right.

The command

returns a valid answer but it includes all the subdirectories in the file count.

View 4 Replies View Related

General :: Count The Number Of Lines Inside A File And Put The Output Into A Variable?

Feb 1, 2011

i need to count the number of files and put the output into a variable. i used wc -l filename but i couldnt find an option to put the output to variable. example if the number o line is 5, i need the output of echo $x is 5.

View 3 Replies View Related

Programming :: Bash Script To Count Number Of Lines With A Specific Property7?

Aug 11, 2010

I would like to parse an input file in which there are two columns per each row. We want to see how many lines are duplicated where we define duplicate to be having the same second field and different first field. For instance if the input file looks like the following:

79874 13131
79873 12309
79820 13131

[code]...

View 10 Replies View Related

General :: Write Shell Script Which Can Take Number Of Files And Count Total Rows From All CSVs?

Oct 8, 2010

I need to write shell script which can take number of files and count total rows from all CSVs and display total number of rows counted in all files. Is there any possibility of doing that using shell script and if yes then how.

View 4 Replies View Related

General :: Let A User Be Able To Login Via Telnet A Max Number Of Times Equal To 2?

Jan 25, 2011

If I only want to let a user be able to login via telnet a max number of times equal to 2 how would I go about doing this?I have found this little tid bit:per_source = 2but that only allows 2 connections from the same source (i.e. network) and that would not work. For some reason our telnet sessions are not dying off after a user has shutdown their PC and then the next time they login it adds another telnet session.

1. user1 31300 /dev/pts/409
2. user1 27539 /dev/pts/539
3. user1 18042 /dev/pts/316

[code]....

View 4 Replies View Related

Ubuntu Multimedia :: Loop A Video A Number Of Times In Ffmpeg Or Mencoder?

Jun 5, 2010

How do you loop a video a number of times in ffmpeg or mencoder? I made a ogv out of a gif. It loops 1 time, so it's less than a second.

View 4 Replies View Related

Server :: Audit System Is In Immutable Mode - No Rules Loaded

Nov 23, 2010

I have /var/log/audit and /var/log/audit.log owned by root and 600 permissions. I've also removed and made an empty /var/log/audit directory when that did not we work either. I can start the service after boot up, but it is not coming up automatically even when configured by chkconfig. I also get this after I attempt a restart...

Stopping auditd: [ OK ]
Error deleting rule (Operation not permitted)
Starting auditd: [ OK ]
The audit system is in immutable mode, no rules loaded

A tail of my /var/log/messages shows this...
Nov 23 16:45:18 hostname kernel: type=1302 audit(1290548718.524:73): item=1 name="/var/run/auditd.pid" inode=131143 dev=fd:01 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=user_u:object_r:var_run_t:s0
Nov 23 16:45:18 hostname kernel: type=1300 audit(1290548718.618:74): arch=c000003e syscall=87 success=no exit=-2 a0=7fff730b2f85 a1=7fff730b2f85 a2=2 a3=0 items=1 ppid=6243 pid=6248 auid=1111 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm="rm" exe="/bin/rm" subj=user_u:system_r:unconfined_t:s0 key="delete"
Nov 23 16:45:18 hostname kernel: type=1307 audit(1290548718.618:74): cwd="/"
Nov 23 16:45:18 hostname kernel: type=1302 audit(1290548718.618:74): item=0 name="/var/run/auditd.pid" inode=131073 dev=fd:01 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:var_run_t:s0
Nov 23 16:45:18 hostname kernel: type=1300 audit(1290548718.620:75): arch=c000003e syscall=87 success=yes exit=0 a0=7fff9b776f81 a1=7fff9b776f81 a2=2 a3=0 items=2 ppid=6243 pid=6249 auid=1111 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm="rm" exe="/bin/rm" subj=user_u:system_r:unconfined_t:s0 key="delete"
Nov 23 16:45:18 hostname kernel: type=1307 audit(1290548718.620:75): cwd="/"
Nov 23 16:45:18 hostname auditd[6260]: Started dispatcher: /sbin/audispd pid: 6262
Nov 23 16:45:18 hostname audispd: af_unix plugin initialized
Nov 23 16:45:18 hostname audispd: audispd initialized with q_depth=80 and 1 active plugins
Nov 23 16:45:18 hostname auditd[6260]: Init complete, auditd 1.7.17 listening for events (startup state enable)

View 4 Replies View Related

Server :: Get Ping To Simply Respond With The Actual Response Times Rather Than A Rounded Off Number?

Oct 11, 2010

I recently setup a new Linux server running Fedora 10. For some reason all ping response times are rounded to the nearest 10ms. For example, running the simple command "ping yahoo.com" give the following sample results:

64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=12 ttl=57 time=60.0 ms
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=13 ttl=56 time=50.0 ms
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=14 ttl=56 time=40.0 ms
64 bytes from ir1.fp.vip.re1.yahoo.com (69.147.125.65): icmp_seq=15 ttl=56 time=50.0 ms

I could post a larger result set but its all the same... every response is rounded to a multiple of 10ms. This wouldn't be a big deal except that the server is running Nagios for monitoring so accurate stats are important. The Nagios check_ping and check_icmp commands are also returning rounded off results. How can I get ping to simply respond with the actual response times rather than a rounded off number?

View 1 Replies View Related

Ubuntu :: Trying To Write Script To Perform Tasks Number Of Times Depending On User Input?

Apr 13, 2011

I'm trying to write a bash script with a for loop that will perform two tasks a number of times depending on the number the user enters at the start. Here is what I got so far. It works fine the first time but then it just exits with no error msgs. The problem is in the way I have written the loop command. I have searched the web for examples to find out what I'm doing wrong with no luck.

#!/bin/bash
declare -i Num=1
declare -i Strnum=8

[code]....

View 3 Replies View Related

Hardware :: Tool - Finding The Mainboard Serial Number?

Jan 15, 2011

Which linux tool can find out mainboard serial number?

View 5 Replies View Related

Programming :: DBD::mysql::st Execute Failed: Column Count Doesn't Match Value Count At Row 1

Feb 24, 2010

I have the following perl/DBI script:

Quote:

#!/usr/bin/perl
use DBI;
my ($db, $user, $pw) = ('dbname', '****', '***********');
my $dbh = DBI->connect("DBI:mysql:$db",$user,$pw) or die "Cannot connect to $db: $DBI::errstr

[code].....

The error message is

[Wed Feb 24 13:03:27 2010] myscript.cgi: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at myscript.cgi. [Wed Feb 24 13:03:27 2010] myscript.cgi: DBI::db=HASH(0x8a30c60)->errstr

View 2 Replies View Related

Ubuntu :: Get The Card Number And Device Number On System For Attched USb Audio Device?

Oct 1, 2010

how to get the card number and device number on system for attched USb audio device?

View 3 Replies View Related

Ubuntu :: Programs To Count Keystrokes (NOT Keylog) For System?

Feb 1, 2010

Are there any programs to count keystrokes (NOT keylog) for Linux?

If not, where could I start manually?

Poking around in /dev/input has turned up nothing usable.
xev only works if the window is selected.

I am trying to compile my usage data to prove to myself that the switch to Dvorak from QWERTY was meaningful.

View 2 Replies View Related

Programming :: Clock() - Doesn't Count How Much System() Works?

Jun 3, 2011

im stuck with something trivial again. so i want to calculate how much time my programm runs:

int main (int argc, char* argv[])
{
clock_t end, start;
start= clock();
int i;
int p, q, r;
FILE* f_out_loc;
[Code]....

it returns 1.12 sec. looks like clock() doesnt count how much system() works .... is it possible? and how do i calculate the whole thing?

View 4 Replies View Related

General :: Is There System Admin Tool For RHEL On Montioring And Logging System Memory

Apr 20, 2011

Is there a system admin tool for RHEL on montioring and logging system memory used and released that can dump to a log file?I'm having an issue with memory not being released when an application is closed. I need to have a tool monitor and log so I can troubleshoot to verify that it's an application not the OS.

View 2 Replies View Related

Security :: Need Remote System Hardening GUI Tool / Possible To Use It Windows System?

Jan 20, 2011

Which is the best remote linux hardening GUI tool.Is it possible to use that tool from windows system?

View 8 Replies View Related

Ubuntu :: System Will Freeze 2 Times After Logging Back In

Nov 9, 2010

I recently installed ubuntu 10.10 and am completely new to linux. Something I recently noticed is that my whole system will freeze 2 times after logging back in, but after that it works fine. I will log in, then it will work fine, but shortly after it will completely freeze. After about a minute, it will unfreeze and everything will work fine. Then after a little longer, the exact same thing will occur. After the second freeze and unfreeze, it never occurs again until I log out and log back in. I do not believe this occurs when first starting the computer.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved