About The Installation Of Awstats

I follow the below URL to install awstats .

Code:
http://thelinuxfaq.com/90-how-to-install-and-configure-awstats-in-centos-fedora-rhel

everything seems works fine , the second last step works fine.
Code:
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 77
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 77 new qualified records.

then I tried the below URL , it shows nothing , would advise what is the possible reason ? how can I do the trouble shooting ? thanks
Code:
http://mydomain.com/awstats/awstats.pl?config=mydomain.com



Similar Content



About Install Awstats

I follow the URL to install awstats , the installation process seems successful .

http://thelinuxfaq.com/90-how-to-ins...os-fedora-rhel

But when I try to run the report by
Code:
http://192.168.0.1/awstats/awstats.pl?config=mydomain.com ,

it pops the error.

Code:
Not Found

The requested URL /awstats/awstats.pl was not found on this server.

then I create /awstats/awstats.pl in DocumentRoot directory , now when I re-try to run the report , it display the program code of the awstats.pl but not show the report , would advise what is wrong ?

NR Versus FNR In Awk Scripts

I have got a data file that contains 22 records.

When i write an awk script to compute the number of records, i print the value of NR variable. Why does it show 23 instead of 22?

I get the same output from FNR variable also. So what is the difference between NR and FNR variable?

In the text i found that
NR: gives number of records read- record number in the current file
FNR: file number of records read- a record number in the current file

Help Mounting A CD-R/DVD-R, Then Using Dd To Write To Them.

I can't seem to mount a CD-R or DVD-R, doesn't matter if it is blank or not.
However, when I use a program such as Brasero, I am able to write to them. I cannot use dd to write to them.

This is the output of trying to mount/unmount.
Code:
root@delarocha-> mount /dev/sr0 /media/cd
mount: /dev/sr0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so.

root@delarocha-> umount /dev/sr0
umount: /dev/sr0: not mounted
root@delarocha-> umount /media/cd
umount: /media/cd: not mounted
root@delarocha-> umount /media/cdrom
umount: /media/cdrom: not mounted

dmesg | tail
Code:
root@delarocha-> dmesg | tail
[ 1536.299777] sr 1:0:0:0: [sr0]  
[ 1536.299804] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1536.299809] sr 1:0:0:0: [sr0]  
[ 1536.299814] Sense Key : Illegal Request [current] 
[ 1536.299820] sr 1:0:0:0: [sr0]  
[ 1536.299824] Add. Sense: Logical block address out of range
[ 1536.299829] sr 1:0:0:0: [sr0] CDB: 
[ 1536.299832] Read(10): 28 00 00 00 00 00 00 00 01 00
[ 1536.299846] end_request: I/O error, dev sr0, sector 0
[ 1536.299915] EXT4-fs (sr0): unable to read superblock

I don't think it can be anything wrong with the disk, since it is a untouched disk.
Note: The results of everything(apart from dmesg I would assume), are the same for a CD-R and DVD-R

This is what I get while trying to dd a .iso and .mp4, respectively.

Code:
web@delarocha-> dd if=/dev/sr0 of=~/Downloads/xubuntu-14.04.1-desktop-amd64.iso
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000377316 s, 0.0 kB/s

Code:
web@delarocha-> dd if=/dev/sr0 of=~/Videos/The\ Hobbit/The\ Hobbit\ The\ Desolation\ of\ Smaug.mp4
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000377179 s, 0.0 kB/s

uname -a
Code:
Linux delarocha 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux

When I used lsblk when I close the disk tray, it shows it mounted.
Code:
sr0                     11:0    1     2K  0 rom

But after I use the dd command to write the .iso, it disappears.

Here is my /etc/fstab
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/delarocha-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=5bbedec0-6e3d-4185-91e0-292a72585908 /boot           ext2    defaults        0       2
/dev/mapper/delarocha-swap_1 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0

I have also tried replacing /dev/sr0 in the above commands with /media/cdrom0.

Perplexing Cron Audio Problem

I'm running LinuxLite 2.0 32bit on a Dell 3000.

I have never come across anything like this and to tell you, I am stumped.

Here are the contents of my crontab file:

Code:
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
*/10 * * * * /usr/bin/arecord -t wav -f cd -d 42 /home/randy/Music/lanting$(date "+\%^b\%d\%y").wav


If I run this from the terminal, everything is fine. It properly records the audio:

Code:
/usr/bin/arecord -t wav -f cd -d 42 /home/randy/Music/lanting$(date "+\%^b\%d\%y").wav

If I run this as it is shown in my crontab file, it records but there is no audio recorded.:


Code:
*/10 * * * * /usr/bin/arecord -t wav -f cd -d 42 /home/randy/Music/lanting$(date "+\%^b\%d\%y").wav

What could be causing this? I tried different cron settings for example 15 14 * * 2

This recorded at 2:15pm on Tuesday (today) but no audio. Yet if I run the code as mentioned above, from the terminal without the cron settings, the recording is fine.

Any ideas what I should do?

Enable Cgi

I have the below URL

http://linoxide.com/ubuntu-how-to/awstats/

in this URL , it have the command "sudo a2enmod cgi" to check the cgi is installed or not , but when I run it , it pops "bash: a2enmod: command not found" , I tried to install it by yum install a2enmod" , but got the below message , would advise how to install it .
Code:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.uhost.hk
 * epel: ftp.cuhk.edu.hk
 * extras: centos.uhost.hk
 * updates: centos.uhost.hk
No package a2enmod available.
Error: Nothing to do

Awk - Process A Set Of Records If Field $5 Of Line 01 Is 'W', Otherwise Copy Set To O

Hi guys,

I am looking to write a script where I need to process many sets of transactions.
I want to process the set if $ 1 == "01" field $5 = "W", and $ 1 == "07" field $3 = "YY" otherwise copy set to output.

Example of the input file:

Code:
01 08 77 78  W  9890
02 08 66 68 0 8554
07 08  YY  85 9 7545
01 08 99 87 X 8787
04 09 85 85 4 8758
09 87 88 78 7 6584
10 84 ZZ 99 8 9887

A new set is always starting with $1 == "01".
Script should only process first set because its 5th value is "W" and put "MATCHED" in the end.
and copy the unmatched set "X" as it is to output.

Code:
Example of output file:
 01 08 77 78 W 9890
02 08 66 68 0 8554
07 08 YY 85 9 7545
MATCHED 
 01 08 99 87 X 8787
04 09 85 85 4 8758
09 87 88 78 7 6584
10 84 ZZ 99 8 9887 

and so on..
thanks for your help

How To Extract Data Between A Matched Strings In A File

Hi All,
I got stuck when i am trying to extract the data between a matched strings in a file which contains a million records with \t is the field seperator. i am getting that matched_string in only one particular field(5 field).

ex: fiel_name:siva.txt

record_1: a b c d _bb_vid:dfndjgddgn~~~ e f g
record_2: h g e f _bb_vid:kdjgfkdhjk~~~ k h d

like this lakhs of records will be there. i want add the result set into end of the file with \t as field seperator.

estimated_out_put:
record_1: a b c d _bb_vid:dfndjgddgn~~~ e f g dfndjgddgn
record_2: h g e f _bb_vid:kdjgfkdhjk~~~ k h d kdjgfkdhjk

please help me guys.

Want A Reliable Music File Player For Red Hat

Hi. I am a noob to Red Hat but have previously used but am no expert with other linuxes such as Puppy and Ubuntu. Can anyone suggest a good music file player for Red Hat (or in general) ? I have many files that I have recorded from records and cassette tapes but Itunes/ Windows won't let me play them, saying that the ORIGINAL cannot be found, so I am switching back to Linux. Thank you. Admins- if this is in the wrong area feel free to move it. Thanks.

Why Should I Always Use Chmod When Not As A Root User

System Info:

I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).

I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.

The OS is installed in VmWare, so the system is all mine.

Problem:

Now I create a file with touch file.sh and put a command in it, but when I want to run it with Code:
sudo ./file.sh

, an error is shown that the command Code:
./file.sh

does not exist. But if I Code:
 sudo chmod 777 ./file.sh

then it gets run. My question is that, why should I use Code:
chmod 777

when I myself have created the file, and I am in sudoers.

Can anyone explain me why shuold I still use Code:
sudo chmod 777

when the creator of the file is me.

Difference Between Udev And Udevadm

Hi. I am relatively new to linux systems. I recently jumped on an endeavor to install a vanilla kernel (3.18.5) from the kernel website. Its Documentation/Changes file mentions the minimum version requirements of the packages needed. For udev, it mentioned Code:
udevd --version

to check the version number. But looking around I found for Fedora its Code:
udevadm --version

(I'm using Fedora Workstation 21 64-bit). Is there any fundamental difference between these two utilities? Any explanation would be helpful.