[opensuse] zypper/rpm tricks question
Hello all, Does anybody know how to perform the following queries with rpm: How to use zypper/rpm to show which packages are an orphan package ? How to use zypper/rpm to show which package has a newer version than the ones that are available in the current enabled repositories ? And lastly, When you issue the command zypper ps, you get a list of processes that are using libraries that are no longer in use, does anybody know how to perform the same trick without using zypper ? Regards Rob -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, Dec 13, 2013 at 5:12 AM, Rob Verduijn <rob.verduijn@gmail.com> wrote:
Hello all,
Does anybody know how to perform the following queries with rpm:
How to use zypper/rpm to show which packages are an orphan package ?
zypper packages --orphaned (opensuse 13.1 only)
How to use zypper/rpm to show which package has a newer version than the ones that are available in the current enabled repositories ?
zypper list-updates
And lastly,
When you issue the command zypper ps, you get a list of processes that are using libraries that are no longer in use, does anybody know how to perform the same trick without using zypper ?
lsof | grep DEL -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Fri, 13 Dec 2013 09:03:57 -0500 Darin Perusich <darin@darins.net> пишет:
On Fri, Dec 13, 2013 at 5:12 AM, Rob Verduijn <rob.verduijn@gmail.com> wrote:
Hello all,
Does anybody know how to perform the following queries with rpm:
How to use zypper/rpm to show which packages are an orphan package ?
zypper packages --orphaned (opensuse 13.1 only)
This assumes that you agree on definition of "orphaned" :) In zypper "orphaned" == "package without repository". -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/13/2013 6:03 AM, Darin Perusich wrote:
And lastly,
When you issue the command zypper ps, you get a list of processes that are using libraries that are no longer in use, does anybody know how to perform the same trick without using zypper ?
lsof | grep DEL
These command are in no way equivalent. losf +L1 will get you something approximating useful information, but it too will list many files that were temp files which some program opened at one time but never bothered to release the handle even when the file was deleted. -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
@John Andersen What would be the correct solution ? And out of curiosity, what amount of file handles do you expect to be negative hits with the "lsof | grep DEL" command ? Regards Rob 2013/12/13 John Andersen <jsamyth@gmail.com>:
On 12/13/2013 6:03 AM, Darin Perusich wrote:
And lastly,
When you issue the command zypper ps, you get a list of processes that are using libraries that are no longer in use, does anybody know how to perform the same trick without using zypper ?
lsof | grep DEL
These command are in no way equivalent.
losf +L1 will get you something approximating useful information, but it too will list many files that were temp files which some program opened at one time but never bothered to release the handle even when the file was deleted.
-- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Rob Verduijn <rob.verduijn@gmail.com> [12-14-13 05:17]:
@John Andersen What would be the correct solution ?
And out of curiosity, what amount of file handles do you expect to be negative hits with the "lsof | grep DEL" command ?
2013/12/13 John Andersen <jsamyth@gmail.com>:
On 12/13/2013 6:03 AM, Darin Perusich wrote:
And lastly,
When you issue the command zypper ps, you get a list of processes that are using libraries that are no longer in use, does anybody know how to perform the same trick without using zypper ?
lsof | grep DEL
These command are in no way equivalent.
losf +L1 will get you something approximating useful information, but it too will list many files that were temp files which some program opened at one time but never bothered to release the handle even when the file was deleted.
Why not answer your own question? from a system with no deleted libraries in use: lsof | grep DEL | wc -l 947 Do not believe this information of much use. ps: Please consider formatting your posts in the manner prescribed for this list: http://en.opensuse.org/openSUSE:Mailing_list_netiquette I removed the sig's but am not going to cut/past the rest to restore order and/or lend better comprehension. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
2013/12/14 Patrick Shanahan <paka@opensuse.org>:
* Rob Verduijn <rob.verduijn@gmail.com> [12-14-13 05:17]:
@John Andersen What would be the correct solution ?
And out of curiosity, what amount of file handles do you expect to be negative hits with the "lsof | grep DEL" command ?
2013/12/13 John Andersen <jsamyth@gmail.com>:
On 12/13/2013 6:03 AM, Darin Perusich wrote:
And lastly,
When you issue the command zypper ps, you get a list of processes that are using libraries that are no longer in use, does anybody know how to perform the same trick without using zypper ?
lsof | grep DEL
These command are in no way equivalent.
losf +L1 will get you something approximating useful information, but it too will list many files that were temp files which some program opened at one time but never bothered to release the handle even when the file was deleted.
Why not answer your own question? from a system with no deleted libraries in use: lsof | grep DEL | wc -l 947
Do not believe this information of much use.
ps: Please consider formatting your posts in the manner prescribed for this list: http://en.opensuse.org/openSUSE:Mailing_list_netiquette
I removed the sig's but am not going to cut/past the rest to restore order and/or lend better comprehension.
-- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
ok, that makes it kinda useless, what do you suggest for a solution when not using 'lsof |grep DEL ' Rob -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
zypper ps ;-) Zypper is open source, so you could dig into the code and see what it is doing. Its probably fairly complex. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
2013/12/14 John Andersen <jsamyth@gmail.com>:
zypper ps
;-)
Zypper is open source, so you could dig into the code and see what it is doing.
Its probably fairly complex. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
So you are saying you don't know either. ;-) I don't know if it's complex. And I don't know c. Just a bit of perl and scripting. So your suggestion to study the source is not really feasable. I know it's fast, I was just wondering what it queried to figure it out so fast. Even google came up short on this one for me. Rob -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Rob Verduijn <rob.verduijn@gmail.com> wrote:
2013/12/14 John Andersen <jsamyth@gmail.com>:
zypper ps
;-)
Zypper is open source, so you could dig into the code and see what it is doing.
Its probably fairly complex. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
So you are saying you don't know either. ;-)
I don't know if it's complex. And I don't know c. Just a bit of perl and scripting. So your suggestion to study the source is not really feasable. I know it's fast, I was just wondering what it queried to figure it out so fast.
Even google came up short on this one for me.
Rob
This used to be simple, but once the cutover to zypper, the old method stopped being reliable. Files with no directory entry but still open, can still be found, but there is a great wheat vs chaff problem. You can also attack it from the processes point of reference, by asking for the open files of each pid. But then you still have to toss out the temp files, and those with multiple pointers, etc. Zypper PS is not fool proof, I remembered finding at least one instance of it failing, when a package was installed in an unusual place. So short answer is, yeah I don't know. I do know that lsof > some-file followed by grepping that file gives different (and seemingly better) results than just lsof |grep. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Andrey Borzenkov
-
Darin Perusich
-
John Andersen
-
Patrick Shanahan
-
Rob Verduijn