I do a lot of file system related vmcore analysis, which means that I sometimes do things like want to walk the entire list of buffers in a transaction and get specific info out of all of them because I'm looking for one particular attribute. This leads me to do stuff like this in a recent case crash> list journal_head.b_tnext 0xffff810095780370 -s journal_head.b_bh | grep b_bh | awk '{ print $3 }' > buffers.txt and then in bash do for i in $(cat buffers.txt); do echo "struct buffer_head.b_private $i" >> cmd.txt; done and then back in crash do crash> < cmd.txt and so on and so on. It would be nice if I could just do struct buffer_head.b_private < buffers.txt or something similar and not have to create a different file to get the right commands.
> or something similar and not have to create a different file to get the right > commands. Yeah, I understand... Although I would just vi the buffers.txt file and enter: :1,$s/^/struct buffer_head.b_private / Anyway, using the suggested "<" input construct would be extremely difficult to implement given that "<" is already a pseudo-command. I'm thinking maybe something like this could be do-able: $ struct buffer_head.b_private --args buffers.txt where for each line in buffers.txt, an instance of the struct command would be kicked off with the arguments in the line. Would that be acceptable?
Yup that works. I usually do vi, but in this case buffers.txt is like 100meg, so it's kind of an extreme case but it happens more often than I like. Thanks.
OK good, lemme look into it. And you're right -- what I've found myself doing is creating an input file such as in your example, but then wanting to dump two members, or maybe a different member entirely, and so on. Instead of having to edit the file each time, it would be kind of nice to leave the address-list file alone, and just have to adjust the command line.
> I'm thinking maybe something like this could be do-able: > > $ struct buffer_head.b_private --args buffers.txt > > where for each line in buffers.txt, an instance of the struct command > would be kicked off with the arguments in the line. > > Would that be acceptable? As it turns out, your original suggestion was a much better idea: Information for build crash-6.0.2-1.fc17 http://koji.fedoraproject.org/koji/buildinfo?buildID=281105 Details here in the upstream changelog: http://people.redhat.com/anderson/crash.changelog.html#6_0_2 And thanks again for coming up with this suggestion -- it's really a pretty nifty addition...
crash-6.0.2-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/crash-6.0.2-1.fc16
crash-6.0.2-1.fc16 has been pushed to the Fedora 16 testing repository.
crash-6.0.2-1.fc16 has been pushed to the Fedora 16 stable repository.