questions about how sysfs.py works
by Guy Streeter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm making an effort to understand how all of tuna works (this is admirable,
not folly, correct?). There's a part of the reload() function in the cpus
class that I don't understand. to start with:
for socket in sockets_to_sort:
self.sockets[socket].sort()
Here self.sockets[socket] is a list of cpu objects. The cpu class is not an
orderable type. It does not provide it's own comparison function, and cannot
be converted to an integer value. What is the (intended) result of calling
the list's sort() function?
Another thing: these lines are indented so as to be included in the outer
loop. It seems these lines need only to be run after the other loop is complete.
I think I must be missing something, since the code seems to work. Although,
I can't find any place that depends on self.sockets[socket] being sorted in
any meaningful way.
thanks,
- --Guy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlP/pq8ACgkQ0Bme0QyNhPTBlgCgqhofpM/Vo1AweHo2WskpIS0Y
4UcAnAvdmi7z/h1c05bhER/wmm3LA4go
=jwbb
-----END PGP SIGNATURE-----
9 years, 1 month
Re: python-inet_diag
by James Hulka
Hello Jiri,
I have created a public repository with my github account so you can
access my patches more easily:
https://github.com/hulkamania/python-inet_diag
Upon preparing everything, I realized it is quite a few additions.
Please have a look at my commit message for an overview of what I have done.
The big difference is I am using inet_diag_req_v2 and I migrated a bunch
more code from socketstat (Alexey Kuznetsov, <kuznet(a)ms2.inr.ac.ru>) for
building filters.
I unfortunately haven't been working with the code for a while because I
have been travelling. I was in contact with Arnaldo in June but my
changes were not yet ready then.
I have also cc'ed tuna-devel on this email.
Feel free to contact me about anything, I am glad someone has this
repository up again. It is a great library and has a lot potential (IMHO).
Best Regards,
James
On 13.10.2014 13:34, Jiri Kastner wrote:
> of course :)
>
> do you have it somewhere in public repo?
>
> as it is dependency of tuna, can you send patches to
tuna-devel(a)lists.fedorahosted.org for review?
>
>
> On Mon, Oct 13, 2014 at 12:20:27PM +0200, James wrote:
>> Dear Jiri,
>>
>> I have been working on a project in which I used python-inet_diag for
>> the past half year in my free time.
>>
>> Since starting my project I required more functionality from the library
>> and so I added some optional parameters to the create function to allow
>> more types of filters to be used as well as some other small extensions.
>>
>> I also found a few memory leaks and fixed them.
>>
>> I would like to make a pull request so that you could review the changes.
>>
>> Is there a way this can be done?
>>
>> Thank you and best regards,
>>
>> James Hulka
>>
9 years, 1 month