lttng-dev Archive on lore.kernel.org
 help / color / Atom feed
* questions about mapping from file names to corresponding inode
@ 2020-05-07  5:23 熊毓华 via lttng-dev
  2020-05-07  5:23 ` [lttng-dev] " 熊毓华 via lttng-dev
       [not found] ` <6e246dec-525a-ef1b-8599-aa5904004ff0@versatic.net>
  0 siblings, 2 replies; 4+ messages in thread
From: 熊毓华 via lttng-dev @ 2020-05-07  5:23 UTC (permalink / raw)
  To: lttng-dev, Mathieu Desnoyers
  Cc: ychen, list徐立恒, Shopping Ruan

[-- Attachment #1.1: Type: text/plain, Size: 919 bytes --]

Hi,

I want to know whether lttng trace data will provide mapping from file names to corresponding inode.

I refered some data parsed by babeltrace,and found that internal kernel tracepoints like writeback_dirty_inode_start、jbd2_submit_inode_data and lttng_statedump_vm_map can provide inode parameter.But I don’t know the meaning of these tracepoints mentioned above, and it seems to have little to do with the mapping we need.I want to know which tracepoint will record the mapping.

In addition, I found the get_inode_from_fd() function at lttng-uprobes.c.It seems to provide some hints, can this function provide the mapping information we want?If so, how should I use it to get the data.



Looking forward to your reply.




thanks,

yuhua


------------------
Yuhua Xiong
Lab for Internet and Security Technology
School of Computer Science and Technology
Zhejiang University
Hangzhou, 310007, P.R. China

[-- Attachment #1.2: Type: text/html, Size: 1192 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [lttng-dev] questions about mapping from file names to corresponding inode
  2020-05-07  5:23 questions about mapping from file names to corresponding inode 熊毓华 via lttng-dev
@ 2020-05-07  5:23 ` 熊毓华 via lttng-dev
       [not found] ` <6e246dec-525a-ef1b-8599-aa5904004ff0@versatic.net>
  1 sibling, 0 replies; 4+ messages in thread
From: 熊毓华 via lttng-dev @ 2020-05-07  5:23 UTC (permalink / raw)
  To: lttng-dev, Mathieu Desnoyers
  Cc: ychen, list徐立恒, Shopping Ruan

[-- Attachment #1.1: Type: text/plain, Size: 919 bytes --]

Hi,

I want to know whether lttng trace data will provide mapping from file names to corresponding inode.

I refered some data parsed by babeltrace,and found that internal kernel tracepoints like writeback_dirty_inode_start、jbd2_submit_inode_data and lttng_statedump_vm_map can provide inode parameter.But I don’t know the meaning of these tracepoints mentioned above, and it seems to have little to do with the mapping we need.I want to know which tracepoint will record the mapping.

In addition, I found the get_inode_from_fd() function at lttng-uprobes.c.It seems to provide some hints, can this function provide the mapping information we want?If so, how should I use it to get the data.



Looking forward to your reply.




thanks,

yuhua


------------------
Yuhua Xiong
Lab for Internet and Security Technology
School of Computer Science and Technology
Zhejiang University
Hangzhou, 310007, P.R. China

[-- Attachment #1.2: Type: text/html, Size: 1192 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: questions about mapping from file names to corresponding inode
       [not found] ` <6e246dec-525a-ef1b-8599-aa5904004ff0@versatic.net>
@ 2020-05-11 16:18   ` 熊毓华 via lttng-dev
  2020-05-11 16:18     ` [lttng-dev] " 熊毓华 via lttng-dev
  0 siblings, 1 reply; 4+ messages in thread
From: 熊毓华 via lttng-dev @ 2020-05-11 16:18 UTC (permalink / raw)
  To: Genevieve Bastien, lttng-dev; +Cc: ychen, 245038403, rlq1969612634

[-- Attachment #1.1: Type: text/plain, Size: 3308 bytes --]

Hi Geneviève,

Sorry for bothering you again for this problem.

Here is a brief description of the problem we encountered.
We are going to build a Linux data collector based on lttng. In some scenarios, the Linux server will perform a lot of file creation and deletion operations. At this time, a hashmap that stores file nodes in our collecotor will explode as the number of files increases. Therefore, we need to remove those file nodes that have been deleted in the hashmap in time.
At first, we wanted to know whether a file node still exists by finding the correspondence between file name and inode in lttng  trace data.  If the file has been deleted, its corresponding inode number cannot be obtained through its filename.Then, we want to find the mapping from file names to corresponding inode in lttng trace data.So I sent you this email.


But it seems that this correspondence cannot be obtained from the lttng trace data, so we are now taking another method to know whether a file node has been deleted through the trace data of unlink or unlinkat sys.

Do you have any suggestions on this question?

thanks,

yuhua.



-----原始邮件-----
发件人:"Genevieve Bastien" <gbastien@versatic.net>
发送时间:2020-05-11 21:53:43 (星期一)
收件人: "熊毓华" <xiongyuhua@zju.edu.cn>
抄送:
主题: Re: [lttng-dev] questions about mapping from file names to corresponding inode



Hi Yuhua,

What are you trying to achieve exactly with this data? I've been looking around this area recently.

We wanted to be able to match requests to disk (block_rq/bio) with the writes to file from the various threads. I looked at the block_dirty_buffer event, as well as writeback_dirty_page. For the block, the dirty buffers are by partition, while the requests are for the device. There is an event (block_bio_remap) that should map the sector from the partition to the sector from the device, but I found no later block requests that included those sectors. I've thus put this investigation on pause for now.

That may not be related to what you're doing, but just in case, I'm sharing my experience with writes to block requests mappings.

Cheers,

Geneviève




On 5/7/20 1:23 AM, 熊毓华 via lttng-dev wrote:

Hi,

I want to know whether lttng trace data will provide mapping from file names to corresponding inode.

I refered some data parsed by babeltrace,and found that internal kernel tracepoints like writeback_dirty_inode_start、jbd2_submit_inode_data and lttng_statedump_vm_map can provide inode parameter.But I don’t know the meaning of these tracepoints mentioned above, and it seems to have little to do with the mapping we need.I want to know which tracepoint will record the mapping.

In addition, I found the get_inode_from_fd() function at lttng-uprobes.c.It seems to provide some hints, can this function provide the mapping information we want?If so, how should I use it to get the data.



Looking forward to your reply.




thanks,

yuhua





------------------
Yuhua Xiong
Lab for Internet and Security Technology
School of Computer Science and Technology
Zhejiang University
Hangzhou, 310007, P.R. China



_______________________________________________
lttng-dev mailing list lttng-dev@lists.lttng.orghttps://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[-- Attachment #1.2: Type: text/html, Size: 4699 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [lttng-dev] questions about mapping from file names to corresponding inode
  2020-05-11 16:18   ` 熊毓华 via lttng-dev
@ 2020-05-11 16:18     ` 熊毓华 via lttng-dev
  0 siblings, 0 replies; 4+ messages in thread
From: 熊毓华 via lttng-dev @ 2020-05-11 16:18 UTC (permalink / raw)
  To: Genevieve Bastien, lttng-dev; +Cc: ychen, 245038403, rlq1969612634

[-- Attachment #1.1: Type: text/plain, Size: 3308 bytes --]

Hi Geneviève,

Sorry for bothering you again for this problem.

Here is a brief description of the problem we encountered.
We are going to build a Linux data collector based on lttng. In some scenarios, the Linux server will perform a lot of file creation and deletion operations. At this time, a hashmap that stores file nodes in our collecotor will explode as the number of files increases. Therefore, we need to remove those file nodes that have been deleted in the hashmap in time.
At first, we wanted to know whether a file node still exists by finding the correspondence between file name and inode in lttng  trace data.  If the file has been deleted, its corresponding inode number cannot be obtained through its filename.Then, we want to find the mapping from file names to corresponding inode in lttng trace data.So I sent you this email.


But it seems that this correspondence cannot be obtained from the lttng trace data, so we are now taking another method to know whether a file node has been deleted through the trace data of unlink or unlinkat sys.

Do you have any suggestions on this question?

thanks,

yuhua.



-----原始邮件-----
发件人:"Genevieve Bastien" <gbastien@versatic.net>
发送时间:2020-05-11 21:53:43 (星期一)
收件人: "熊毓华" <xiongyuhua@zju.edu.cn>
抄送:
主题: Re: [lttng-dev] questions about mapping from file names to corresponding inode



Hi Yuhua,

What are you trying to achieve exactly with this data? I've been looking around this area recently.

We wanted to be able to match requests to disk (block_rq/bio) with the writes to file from the various threads. I looked at the block_dirty_buffer event, as well as writeback_dirty_page. For the block, the dirty buffers are by partition, while the requests are for the device. There is an event (block_bio_remap) that should map the sector from the partition to the sector from the device, but I found no later block requests that included those sectors. I've thus put this investigation on pause for now.

That may not be related to what you're doing, but just in case, I'm sharing my experience with writes to block requests mappings.

Cheers,

Geneviève




On 5/7/20 1:23 AM, 熊毓华 via lttng-dev wrote:

Hi,

I want to know whether lttng trace data will provide mapping from file names to corresponding inode.

I refered some data parsed by babeltrace,and found that internal kernel tracepoints like writeback_dirty_inode_start、jbd2_submit_inode_data and lttng_statedump_vm_map can provide inode parameter.But I don’t know the meaning of these tracepoints mentioned above, and it seems to have little to do with the mapping we need.I want to know which tracepoint will record the mapping.

In addition, I found the get_inode_from_fd() function at lttng-uprobes.c.It seems to provide some hints, can this function provide the mapping information we want?If so, how should I use it to get the data.



Looking forward to your reply.




thanks,

yuhua





------------------
Yuhua Xiong
Lab for Internet and Security Technology
School of Computer Science and Technology
Zhejiang University
Hangzhou, 310007, P.R. China



_______________________________________________
lttng-dev mailing list lttng-dev@lists.lttng.orghttps://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[-- Attachment #1.2: Type: text/html, Size: 4699 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  5:23 questions about mapping from file names to corresponding inode 熊毓华 via lttng-dev
2020-05-07  5:23 ` [lttng-dev] " 熊毓华 via lttng-dev
     [not found] ` <6e246dec-525a-ef1b-8599-aa5904004ff0@versatic.net>
2020-05-11 16:18   ` 熊毓华 via lttng-dev
2020-05-11 16:18     ` [lttng-dev] " 熊毓华 via lttng-dev

lttng-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lttng-dev/0 lttng-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lttng-dev lttng-dev/ https://lore.kernel.org/lttng-dev \
		lttng-dev@lists.lttng.org
	public-inbox-index lttng-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.lttng.lists.lttng-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git