Home -- Contact -- Site Map

Saturday, October 17, 2009

Huge Log Files

Problem:
-- The VM has limited space
-- You're getting a filesystem full error message
-- A log file has gotten ridiculously large (1.5GB in my case)


Details:
-- FreeBSD system 6.2-STABLE



Oct 9 06:00:00 system kernel: pid 13311 (dd), uid 2 inumber 47118 on /var: filesystem full


%df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 496M 64M 392M 14% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1e 496M 26K 456M 0% /tmp
/dev/ad0s1f 9.7G 2.2G 6.7G 25% /usr
/dev/ad0s1d 1.9G 1.8G -2.8M 100% /var


%ls -alh
total 1720980
drwxr-xr-x 3 root wheel 1.5K Oct 9 03:01 .
drwxr-xr-x 24 root wheel 512B Oct 8 16:50 ..
....
-rw-r--r-- 1 root wheel 1.4G Oct 9 07:02 httpd-access.log
-rw-r--r-- 1 root wheel 247M Oct 8 22:53 httpd-error.log


Solutions:
-- Backup, remove, and recreate the files
-- Backup and use the built in tool: truncate
-- Delete everything.

Let's do it:
the filesystem full error message will tell you which filesystem is full, to view details about your other filesystems use the df command

%df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 496M 64M 392M 14% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad0s1e 496M 26K 456M 0% /tmp
/dev/ad0s1f 9.7G 2.2G 6.7G 25% /usr
/dev/ad0s1d 1.9G 1.8G -2.8M 100% /var


Looks like our /var directory is full. There are few things, that I know of, that would grow and cause this directory to fill; the log files.

use the cd command to cd to the directory the logs are located at

%cd /var/log/


use the list command with the proper flags to view files and their human-readable sizes

%ls -alh
total 1720980
drwxr-xr-x 3 root wheel 1.5K Oct 9 03:01 .
drwxr-xr-x 24 root wheel 512B Oct 8 16:50 ..
....
-rw-r--r-- 1 root wheel 1.4G Oct 9 07:02 httpd-access.log
-rw-r--r-- 1 root wheel 247M Oct 8 22:53 httpd-error.log


Looks like we have some pretty large files there, the G means gigabytes and the M means megabytes. While it is generally believed that bigger is better this is a bit much.
We can either delete these two files and recreate them or shave off some of the extra fluff.

Take a quick look at the manual page for truncate. Then put on your robe and wizard's hat. Once you're set You can speak the magic words:

truncate -c -s -900m httpd-access.log


And this should chop your file down a fair bit. You can keep using this command and modify the number until you get the file down to what you feel is a reasonable size.

%ls -alh
total 1720980
drwxr-xr-x 3 root wheel 1.5K Oct 11 00:00 .
drwxr-xr-x 24 root wheel 512B Oct 10 18:14 ..
....
-rw-r--r-- 1 root wheel 7.5M Oct 11 00:25 httpd-access.log
-rw-r--r-- 1 root wheel 7.3M Oct 11 00:17 httpd-error.log


All that's left now is to take off the robe and wizard's hat....and put it all away...

Sunday, September 6, 2009

Project Outline: N.O.’ing

I want to make a conjugation practice program thing for Japanese. Japanese programming is pretty systemic so it should lend its self to being programmed by me fairly easily. I’m naming it “Not only ‘ing” and abreviating it as: N.O.’ing


This is a fancy name because there is more to conjugation than just attacking “ing” to a verb and N.O.’ing can be read as Knowing...Shouldn’t have to explain this.


So here is the outline:


  1. Project Name:

    1. Knowing~

    2. N.O.’ing

    3. Not Only ‘ing

  2. Project Type:

    1. Educational

  3. Project Details:

    1. Description: A platform for going over various types of Japanese Conjugation rules

    2. Web based application PHP/*SQL application

      1. Focused on mobile usage: UMPC, Mobile Phones(?), PSP, and the Nintendo DS

      2. ultra lite

    3. *nix desktop application

    4. Web based tracking?

  4. Project Work Flow:

    1. Figure out table:

      1. How many tables will I need?

      2. How to link tables to store info related to another.

      3. General DB table design.

      4. Create a modular, extensible database(table?) to hold verbs with their:

        1. Conjugation rules

        2. Japanese line type/name

        3. Grammatical Categorization

        4. Miscellaneous Details

        5. Conjugation Formulas

        6. Room to add more (stuff)

      5. How to avoid the orz

    2. Figure out script to table design

      1. MySQL+PHP or PostGres + PHP or....?

    3. Figure out front end to back-end script

      1. CSS, HTML and JavaScript

      2. How much JavaScript is too much JavaScript?

    4. Theming

      1. PSP theme

        1. How can this be made quick and easy, to use, as a web app. for the PSP?

        2. PSP does not have touch screen

        3. PSP has a large screen

      2. DS theme

        1. DS has two screens

        2. Very few browsers for the original DS

        3. F.O.S.S. Browser for the DS ain’t the best.

        4. DS has one touch screen

      3. UMPC

        1. Generally like a desktop theme?

        2. UMPC may have touch screen

        3. UMPC may not have touch screen

        4. UMPC may be windows based

        5. UMPC may have a proprietary OS

        6. Drop UMPC support?

    5. Web Based Tracking?

      1. Is it within my range?

      2. Can/Will I get help

      3. How to do web based tracking?

        1. Login + password

        2. syncing user progress from multiple devices

        3. User metrics

        4. User updates

      4. orz

    6. orz

  5. orz

Project Outline: "Not this year...."

I want to make a game, a short little game with a simple plot based off a New-Years resolution. Here is my project outline for the game. I suppose I'll write what I get/make as I get/make

  1. Project Name:

    1. “Not this year....”

  2. Project Type:

    1. Game

  3. Project Details:

    1. Description: A simple dating sim like game

    2. Cross platform game using the Ren'Py Visual Novel Engine

    3. Requirements: Ren'Py, Visual Art, Audio Art

  4. Project WorkFlow:

    1. Write storyline(Story Telling)

      1. Character design

        1. How many characters?

        2. What kind of characters?

        3. Main character

        4. Secondary characters?

        5. Other, background, characters

      2. Time-Line

        1. When did the story start

        2. When did the story end

        3. what are the times and dates the story focuses on?

      3. Location

        1. Is there only one location?

        2. What are other locations?

        3. Key places?

        4. Location art.

      4. Create Art

        1. Location art

        2. Character art

        3. BGM

        4. SFX

    2. Code Events

      1. Scripting language is python

      2. General Dev needs very little intensive python

 
::Site Map::.....
    ♥Multi-Media
  • Photography
    • Sceanery
    • Commisioned
    • Wildlife
    • Miscellaneous
  • Graphics
    • 3D still renders
    • 'Shopped
    • WallPapers
    • Miscellaneous
  • Videos
    • 3D animetions
    • In r/l
    • pro-ductions
    • Miscellaneous
  • Audio
    • Sound Bites
    • Dope beats
    • Miscellaneous
    ♥Projects
  • Web
    • Jinkaku.net
    • This site
    Desktop
    • None now
    ♥About
  • Me
    • Education
    • Work EXP.
  • The Site
    • Design
    • Statistics
    ♥Language
  • Japanese
    • Phrases
    • Tips 'n tricks
    • vocabulary
  • Spanish
    • Phrases
    • Tips 'n tricks
    • vocabulary
  • Korean
    • Phrases
    • Tips 'n tricks
    • vocabulary
    ♥Miscellaneous
  • Links
    • Educational
    • Humor
    • cohorts
  • Badges