Re: Need help in using debugFs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a lot for all the replies.

I am able to use the debugfs. But, I am not able  to understand the information displayed by ls -l command in the debugfs env
Here, is a sample output

This is the current directory structure (file system is mounted at /mnt)
/mnt/
   |--------------- dir
   |                  |----------------- 1
   |--------------- lost+found
   |--------------- test
   |--------------- test1
   |--------------- test2

test1 and test2 are hard links to file test (there is no data in the file)

HERE IS THE OUTPUT

debugfs:  ls -l
      2   40755 (2)      0      0    1024 27-May-2008 20:03 .
      2   40755 (2)      0      0    1024 27-May-2008 20:03 ..
     11   40700 (2)      0      0   12288 27-May-2008 20:02 lost+found
     12  100644 (1)      0      0    1037 27-May-2008 20:05 test
     13   40755 (2)      0      0    2048 27-May-2008 20:08 dir
     12  100644 (1)      0      0    1037 27-May-2008 20:05 test1
     12  100644 (1)      0      0    1037 27-May-2008 20:05 test2

debugfs:  ls -l dir
     13   40755 (2)      0      0    2048 27-May-2008 20:08 .
      2   40755 (2)      0      0    1024 27-May-2008 20:03 ..
     14   40755 (2)      0      0    1024 28-May-2008 15:48 1
      0       0 (0)      0      0       0                  

debugfs:  ls -l dir/1
     14   40755 (2)      0      0    1024 28-May-2008 15:48 .
     13   40755 (2)      0      0    2048 27-May-2008 20:08 ..

debugfs:  mkdir dir/2
debugfs:  ls -l
      2   40755 (2)      0      0    1024 27-May-2008 20:03 .
      2   40755 (2)      0      0    1024 27-May-2008 20:03 ..
     11   40700 (2)      0      0   12288 27-May-2008 20:02 lost+found
     12  100644 (1)      0      0    1037 27-May-2008 20:05 test
     13   40755 (2)      0      0    2048 27-May-2008 20:08 dir
     12  100644 (1)      0      0    1037 27-May-2008 20:05 test1
     12  100644 (1)      0      0    1037 27-May-2008 20:05 test2

debugfs:  ls -l dir
     13   40755 (2)      0      0    2048 27-May-2008 20:08 .
      2   40755 (2)      0      0    1024 27-May-2008 20:03 ..
     14   40755 (2)      0      0    1024 28-May-2008 15:48 1
     15   40755 (2)      0      0    1024 28-May-2008 16:51 2
      0       0 (0)      0      0       0                  

Can any one please tell me what these collumns represent?

Thanks and Regards,
Prasad.

On Wed, May 28, 2008 at 8:00 AM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
On Wed, May 28, 2008 at 12:17 AM, Frédéric Weisbecker
<f.weisbecker@xxxxxxxxx> wrote:
> Hi!
>
> Here is a small tutorial:
> http://docs.blackfin.uclinux.org/doku.php?id=file_systems#file_system_exampledebugfs

Yes, that is the kernel-based debugfs, and u used it via the following
manner (not mentioned in the page, but widely available in Internet):

Method 1:

put the following line in /etc/fstab for automatic moutning at bootup:

none               /sys/kernel/debug                    debugfs
defaults        0 0


Method 2:

Issue:

mount -t debugfs none /sys/kernel/debug

at command line level.

BUT....in my Fedora FC7 distros, at the commandline level there is a
"debugfs" command (man debugfs):

DEBUGFS(8)                                                          DEBUGFS(8)

NAME
      debugfs - ext2/ext3 file system debugger

SYNOPSIS
      debugfs  [ -Vwci ] [ -b blocksize ] [ -s superblock ] [ -f cmd_file ] [
      -R request ] [ -d data_source_device ] [ device ]

DESCRIPTION
      The debugfs program is an interactive file system debugger. It  can  be
      used to examine and change the state of an ext2 file system.
      device  is  the special file corresponding to the device containing the
      ext2 file system (e.g /dev/hdXX).

OPTIONS
      -w     Specifies that the file system should be  opened  in  read-write
             mode.   Without  this option, the file system is opened in read-
             only mode.

.........

Very confusing.....but I think this is not what u want....it is a tool
as part of the e2fsprogs package (e2fsprogs.sourceforge.net, I think).


> If you need more help to use it, don't hesitate to ask!
> As you will see there are two ways to use it:
>
> _ By creating a file which exports or import a single variable. It's simple
> but asynchronous (you or the user-process needs to check periodically if the
> value has changed.
> _ By implementing the common file operations. But it stays simple and it's
> synchronous.
>
> Regards,
> Frédéric...
>
>
>
>
> 2008/5/27 Prasad Joshi <prasadjoshi124@xxxxxxxxx>:
>>
>> Hi All,
>>
>> I have an assignment and I am supposed to use debugfs for the same.
>> Can anyone please help me? or Point me to a link which tells  how to use
>> debug fs?
>>
>> Thanks and Regards,
>> Prasad
>
>



--
Regards,
Peter Teoh


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux